Regular expressions (often shortened to "regex") are a declarative language used for pattern matching within strings. Please also include a tag specifying the programming language or tool you are using.

learn more… | top users | synonyms (6)

0
votes
0answers
6 views

Ant: Malformed \uxxxx encoding in propertyfile task

I get the error below with an Ant skript I wrote. I already did some googling and found out, that the problem lies with strings containing \u, which happens under Windows because of the directory ...
0
votes
1answer
13 views

Regex for conditional expressions

I need a regex that can divide into token an expression like this: (6<=5) || (8+1)^2 >= 3 && 4 == 2 The result should be a list like this: (, 6, <=, 5, ), ||, (, 8, +, 1, ), ^, ...
-4
votes
0answers
41 views

Regular exprsssion for string [closed]

Need regular expression for string containing following condition: Atleast 8 char starts with Capital Letter 3 Small Letters 1 Special Char 3 Digits
0
votes
0answers
7 views

RegEx to rewrite a multi-folder path and file name with unknown and varying folder depth

I need to capture and rewrite a URL path substituting a ~ for each / ending the rewrite with a ~followed by the file name with extension (.jpg) from the original path. The rewrite should NOT be done ...
0
votes
3answers
33 views

Regular expression match any character at the beginning end with specific string

I have the following string: "bar foo test-line drop-line" I need to replace the words that starts with anything and ends with '-line'. basically having: "bar foo new_word new_word" I tried: ...
0
votes
2answers
23 views

Regular expression match for &DaysAgo=3

The title says it all. Just to add that the number can be multiple digits. I'm using the following function: str_replace( "/^\&DaysAgo=d+$/", "", $save_query);
0
votes
1answer
18 views

Find substr between delimiter characters in Qt with RegEx

I need to obtain a substring in a string in Qt, but with a few details: the substring I need is delimited by [ and ] the substring might have some unpredictable characters like /, ^, -. This ...
1
vote
0answers
19 views

Regex for url-encoded string in .htaccess

I have to addresses for one site (different langs) and I need a redirect with saving query string. So I need to catch this ...
-1
votes
1answer
45 views

java regular expression for multiple spaces

Can I write a single line regular expression instead of the five lines below? strTestIn = strTestIn.replaceAll("^\\s+", ""); strTestIn = strTestIn.replaceAll("[ ]+", " "); strTestIn = ...
3
votes
1answer
22 views

Wrong regex match using cl-ppcre?

Trying to parse the following text file: prefix1 prefix2 name1( type1 name1, type2 name2 ); with following regex: ...
0
votes
4answers
17 views

VB.net Regular expression to return until last sentence before ellipsis or three full-stops

I am trying to write an expression to take a block of text an return up until a full-stop before an ellipsis or three full-stops (... or …). So the idea is that the example text test string: Lorem ...
1
vote
1answer
28 views

Regex identify and strip '.00' in strings

My users are entering products in their stores, and my PHP CMS prints prices as a normal 2 decimal number. My problem is that all of the whole number prices, i.e. 80 are printing as 80.00 - I'd like ...
1
vote
1answer
26 views

Perl Japanese to English filename replacement

I put together a perl script that works to replace Japanese file names to English file names. But there are still a couple of things that I don’t quite understand well. I have the following ...
1
vote
4answers
70 views

Regular expression for version number bigger than 1.18.10

I need to verify if the version number of application bigger than 1.18.10. How regular expression should look like in this case?
1
vote
3answers
18 views

Select words with .domain in textfile with php and preg_match

I try so select some name who finish with .domain The filetext is like : . .. script truc.domain machin.domain Fore exemple i want to select truc.domain and machin.domain I try this if ...

1 2 3 4 5 4038
15 30 50 per page