Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [regex]

A regular expression (sometimes abbreviated to "regex") is a way for a computer user or programmer to express how a computer program should look for a specified pattern in text and then what the program is to do when each pattern match is found.

0
votes
1answer
10 views

Powershell to replace string in snippet in default.aspx

I have a requirement to replace a style section by appending in a new @import url for every default.aspx page in our farm. The problem comes in because this area might look like: <![CDATA[<...
0
votes
1answer
24 views

RegEx to strip out AD OU data in SharePoint Designer Workflow

I have a script run that pulls AD data into a SharePoint list, this pulls the Line Manager field as: CN="Manager name",OU="1st OU",OU="2nd OU",OU="3rd OU",OU="4th OU",DC="FQDN" However I want to ...
0
votes
1answer
55 views

Regex to replace substring in string (workflow)

Can anybody point me in the right direction on how to use regex to replace a substring in a string using SharePoint workflow 2013? I have an input field where the user potentially can enter ...
2
votes
0answers
51 views

Match/move based on data in the title of a document to folder of the same name

So I have a Library with a list of documents. These docments (PDFs) are named in the following format. DeptCode_MgrNumber_MgrLast,MgrFirst_EmpName_634242 I would like to find a way to ...
1
vote
1answer
43 views

Clean up Sharepoint URLs for Google Analytics?

When using Google Analytics on Sharepoint how can I clean up the URLs? I want to have a better idea of what my users are actually doing vs. seeing things like: http://sp.company.com/sites/blah/...
0
votes
0answers
127 views

Colon : breaks query rule regex match

Our company has a learning system where employees can take required training. Each course gets a number. We find in our SharePoint site search logs that a lot of folks are searching for course numbers ...
0
votes
1answer
121 views

DecodeURI Not Working

Not specifically a SharePoint issue but i'm using it with the confines of SharePoint 2013 REST API. The following code is used to get URL parameters. <script type="text/javascript"> function ...
1
vote
1answer
79 views

geturlvars - regex explanation sought - SharePoint 2013

I'm relatively new to javascript and i am currently working on a project that has previously had a SharePoint contractor involved, person has now left the organisation. He has used some script on an ...
0
votes
2answers
54 views

SharePoint desiner do not allow character { and , together in regular expressoin

I am using a regular expression for email validation and to limit the number of character in SharePoint edit form (data form webpart) <asp:TextBox runat="server" id="ff58{$Pos}" ControlMode="Edit" ...
0
votes
1answer
948 views

Workflow regex to match at least two comma

I am trying to find if a column contains more than two comma in it. I tried If Variable: div matches regular expression /,[^,]*,/ Set Variable: test to more than two Else Set Variable: test ...
1
vote
1answer
506 views

Parsing a CAML query in C#

I have a SharePoint 2010 solution with a custom web part. I am using C# in Visual Studio 2012. The user has selected a view from a list, which I am storing as an SPView object, mobjView. I want to ...
0
votes
3answers
54 views

regular expression for exact word with additional characters only

I need to exclude a few SharePoint sites from crawling. I would like to use a regular expression to do that. How should the regular expression be setup? Note: I have a crawl rule to exclude ://...
2
votes
2answers
6k views

RegEx to validate and replace invalid file name characters from a custom web part file upload control

Scenario: I have a fileupload control in my custom webpart that attaches the uploaded files to the list item. The attachment code is given below: private void UploadAttachments(Helper ...
1
vote
1answer
279 views

Workflow Regular expression fails to check if date is empty

I am trying to create a document on a list if a date list field is set. So I have a workflow that executes when a list item is changed. In the workflow, I have set a workflow variable X to mydate (...
0
votes
1answer
1k views

Regular expression in Search Sharepoint 2013

I' having problems with using a regular expression in Sharepoint 2013 Search. I insert it into a crawl rule and checked Use regular expression syntax for matching this rule. I validated my regex on ...
2
votes
0answers
330 views

XSLT, regex and RenditionID

I'm sort of new in XSLT, and i need some clues, if you're willing to give me some... What i want: In a CQWP, i want to display items' images, with a certain rendition ID. But, when retrieving the ...
0
votes
2answers
912 views

What do these out of the box Regular Expressions in Query Rules mean?

I would like some help to figure out what these Regular Expression rules in search Query means, or could anyone link me resources related to Regular Expressions for Sharepoint 2013 Search? 1) (?^|[^#]...
1
vote
1answer
1k views

CAML query regex

is there a way to perform regex query with CAML? I have a string field (Display) composed by Name and Surname. I have a single search input. I wish to have these results *Display* match UserInput ...
0
votes
0answers
116 views

query rule sharepoint search

((^(?!(([\d-\.\s\(\)+]*([a-df-su-wyzA-DF-SU-WYZ]+|[tT]|[eE](?![xX][tT])|[xX][a-zA-Z]+))|(\d{1,3}$)|((\+|00|0)(\d+)$)))(")?(((\+|00|0)|(?=(\d*\s*\()))[0]*(?<country>\d+))?[\.\s-]?(\(?(?<area&...
0
votes
1answer
643 views

Find/Replace with regular expressions in Sharepoint Designer

Using Sharepoint Designer 2007. I have the following block of code taken from a C# app: sbuilder.Append("x"); sbuilder.Append("y"); sbuilder.Append("z"); and so on. I'm translating it to ...
1
vote
1answer
2k views

Renaming uploaded files - removing illegal characters

I must admit that I am totally unexperienced with developing anything to SP, but my problem sounds pretty simple - I need to manage some kind of regex command to rename any files uploaded to SP. The ...
0
votes
2answers
5k views

Infopath Regex for 7 - 15 characters with atleast one digit and character

I am trying to create a textbox in infoth form with following creteria: 1.) Length should be 7-15 characters 2.) It should contain at least one digit 3.) It should contain at least one character 4.) ...
2
votes
1answer
2k views

SPD Workflows and RegEx

Is it possible to use a regular expression in an SPD workflow? I am trying to use the for-each hack to take a list of semicolon delimited values and create a new form for each of them, but I can't ...
0
votes
2answers
3k views

Remove Leading and Trailing Spaces from Rich Text Box using C# code

I am using a MultiLine Rich Text box in my custom list, now I want to remove leading and trailing spaces in the MultiLine Rich text box's input. I have written an List item event receiver with string....
3
votes
2answers
1k views

Regex Query Against FAST Search 2010

I'm looking for a way to do searches with FAST Search Server 2010 based on Regular Expressions. For instance, I'd like to be able to use: ^\d{3}-\d{2}-\d{4}$ And have it return any content that ...
0
votes
1answer
684 views

Regular expression for validating a SharePoint site address

I am trying validate an input from a text box and I want to make sure it is a well formed SharePoint address, e.g. http://site/ Does anyone have a regular expression that can do this or another method ...
1
vote
1answer
5k views

How can use Regular expression for Column Validation in Sharepoint 2010?

Is there a way that i can use the newly introduced "column validation" in Sharepoint 2010 Lists to validate that the value conforms to a regular expression? For example: if i create a column for ...
2
votes
1answer
4k views

Regex to Parse Script Tags

I need some regex help for my jQuery Library for SharePoint Web Services , which is certainly for SharePoint! I need to be able to parse out the attributes in SCRIPT tags reliably for my ...