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 (5)

0
votes
4answers
37 views

Perl RegEx moving whitespace

I am trying to reformat some code, specifically conditional blocks, from having logic operators at the end of lines, to start of lines, as such: if ($arg == true || $arg != null ...
0
votes
4answers
26 views

How can I capture a value from a string and then remove it?

I'm trying to get the number from a string and then remove that number. For instance, I'm going to have a string like '42Xmessage' where 42 is the number I want (it could be any number of digits) and ...
0
votes
2answers
13 views

Python 3 - Spinning text

I'm stucked on doing something like this.. from this {Hi|Hello} I am - {Me|You|Us} to this #Possible results 'Hi I am - You' 'Hello I am - Me' 'Hi I am - Us' 'Hello I am - You' So basically, ...
2
votes
1answer
56 views

Microsoft's implementation of std::regex

I have been working with the <regex> library (Microsoft Visual Studio 2012: Update 3), trying to use it to implement a slightly safer loading procedure for my application, and have been having a ...
0
votes
1answer
46 views

My regex doesn't work

I don't see the difference between creating a new regexp object or using /.../ because if I execute the following I get: true false alert(/^\d{4}$/.test(obj.value)+" "+(new ...
0
votes
3answers
41 views

Splitting on , with regexp in java

i am trying to split this input: sum(12),sum(3,34,23),122 into these: sum(12) sum(3,34,23) 122 I have the following code pattern = ...
-2
votes
1answer
51 views

Please decode this regular expression for me [on hold]

I inherited some php code for a webgame that I am trying to modify. I came across this line, and I can't figure out what it is supposed to be doing. Could someone help me out? $notice is just a ...
0
votes
2answers
31 views

Check the start value with jquery regular expressions

hello everyone I’m wondering if i can check the beginning of the value with jquery i tried this code $('#ads_img').keyup(function(){ if($(this).val() ^= 'http://'){ alert('ok'); } }); but it ...
2
votes
2answers
40 views

Regex matching string python

I wanted to match the following string: strings = iamcool.iplay=ball?end I want to remove items starting (including the ".") and up till "?", so I want to remove .iplay=ball, so I should have ...
-2
votes
1answer
27 views

Need New Username Validation RegEx

I currently have this in an old system I'm working on: /^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/ It's checking for usernames. I've imported a few email address as username, and these accounts ...
0
votes
1answer
31 views

Java Regexp pattern in Android

What characters does block this pattern: private static Map<String, String> parseMetadata(String metaString) { Map<String, String> metadata = new HashMap<String, String>(); ...
-2
votes
0answers
24 views

jQuery to detect Carrier using Tracking number

How can jQuery be used to determine the type of carrier (eg. USPS, UPS, FedEx) from a tracking number entered into a text input?
0
votes
1answer
40 views

Regex matching newlines when it shouldn't?

I don't understand. In .NET i specify RegexOptions.Multiline, using http://gskinner.com/RegExr/ i checkoff global and multiline What I expect is ^ and $ to match the start and end of the line and . ...
1
vote
1answer
24 views

Javascript ignore NaN characters in string

Bear with me because I'm very new to javascript. I'm making a simple progress bar script. I'm having the user input the progress percentage into one of the variables. Instead of giving an error and ...
0
votes
0answers
25 views

Boost regular expression to exclude Chinese symbols

I am trying to create a regular expression for avoiding match with Chinese characters and in general I want to avoid all the similar languages that use symbols. However, I don't know how to do that. ...

1 2 3 4 5 4187
15 30 50 per page