1 2 >   Sort: Date

Regular Expression (RegEx) Information Center
Are you having problems using regular expressions when processing text strings in your applications or when editing text files? Welcome to visit this information center, where you can enhance your knowledge on regular expressions; learn how to write and test regular expressions. regex.fyicenter.com ...
2016-07-06, 6928👍, 1💬

Parsing file entries from Windows "dir" command
How to write a regular expression to parse file entries from the output of Windows "dir" command? Here is an example output of the "dir" command:Directory of C:\Windows\System32 01/30/2013 11:44 AM . 01/30/2013 11:44 AM .. 07/13/2009 11:56 PM 0409 01/16/2012 10:13 PM 1033 06/10/2009 04:16 PM 2,151 1...
2013-02-01, 3301👍, 0💬

Using negative character class [^...]
What is a negative character class? How to specify a negative character class in a regular expression? How to use negative character class to capture words that contains no vowel letters in this lyrics: Daddy started out in San Francisco, Tootin' on his trumpet loud and mean, Suddenly a voice said, ...
2013-02-02, 2994👍, 0💬

Positive look-behind assertion (?<=...)
What is a positive look-behind assertion? How to use it? How to write a regular expression to find words ending with 'oo' in text like: how, too, bamboo, school,? A positive look-behind assertion is a zero-width assertion that allows you to match a subpattern left to the current position (look-behin...
2013-01-31, 2830👍, 0💬

Escape sequence - Carriage Return character \r
What is the escape sequence for the Carriage Return character? On Unix systems, a line break is a single New Line character. But on Windows systems, a line break is a Carriage Return character followed by a New Line character. How to write a regular expression to capture line breaks for both systems...
2013-01-26, 2780👍, 0💬

Backreferences \g1, \g2, ...
What is a backreference? How to use a backreference? How to write a regular expression using a backreferences to capture 5-letter reversible words in a text string like this: civic, level, radar, rotor or stats? Backreferences are references representing catured sub strings already matched in earlie...
2013-01-23, 2780👍, 0💬

Parsing directory entries from Windows "dir" command
How to write a regular expression to parse sub directory entries from the output of Windows "dir" command? Here is an example output of the "dir" command:Directory of C:\Windows 12/15/2012 09:24 AM . 12/15/2012 09:24 AM .. 07/13/2009 11:52 PM addins 01/19/2012 10:48 AM AppCompat 11/29/2012 09:16 AM ...
2013-02-01, 2748👍, 0💬

Escape sequence - Character in hexadecimal \x.. \x{..}
What is the escape sequence for a character written in hexadecimal format? How to write a regular expression to capture the escape (Backslash) \ character in a string like: \x5C The escape sequence for any character in hexadecimal format is '\x..' or \x{..}, '..' is the 2 hexadecimal digits. For exa...
2013-01-26, 2747👍, 0💬

Escape sequence - Character in octal \... \o{...}
What is the escape sequence for a character written in octal format? How to write a regular expression to capture the escape (Backslash) \ character in a string like: \x5C The escape sequence for any character in octal number format is '\...' or \o{...}, '...' is the 3 octal digits. For example: \06...
2013-01-26, 2657👍, 0💬

Using character class [...]
What is a character class? How to specify a character class in a regular expression? How to write a regular expression using character classes to capture 7 digits phone numbers from this example string "123-4567, 123 4567 or 1234567"? A character class allows a set of possible characters, rather tha...
2013-02-02, 2640👍, 0💬

Negative look-behind assertion (?<!...)
What is a negative look-behind assertion? How to use it? How to write a regular expression to find words not ending with 'oo' in text like: how, too, bamboo, school,? A negative look-behind assertion is a zero-width assertion that allows you to not match a subpattern left to the current position (lo...
2013-01-31, 2620👍, 0💬

"non-greedy" on quantified subpatterns +? *? {}?
How turn off the the greediness of quantified subpatterns? I want the quantified subpattern to be matched the minimum number of times possible? How to create a "non-greedy" quantified subpattern on this PHP script: if ($t=10): echo "Just started...!"; endif; if ($t=11): echo "Hungry!"; endif; if ($t...
2013-01-26, 2543👍, 0💬

Multiple line modifier - m
What is the multiple line modifier? How to use it? How the multiple line modifier can be used on this example text:06/10/2009 04:21 PM 69,584 avicap.dll 06/10/2009 04:21 PM 109,456 avifile.dll 07/13/2009 04:41 PM 32,816 COMMDLG.DLL 07/13/2009 04:41 PM 2,000 keyboard.drv 06/10/2009 04:42 PM 9,936 lze...
2013-02-02, 2492👍, 0💬

Single line modifier - s
What is the single line modifier? How to use it? How the single line modifier can be used on this example text:class Hello { public static void main(String[] args) { System.out.println("Hello World!"); // Display the string. } } The single line modifier 's', also called "dot all" modifier, modifies ...
2013-02-02, 2482👍, 0💬

Decimal digit character class - \d
What is abbreviation of a character class of all decimal digits? How to write a regular expression using a character class abbreviation to capture signed integer numbers in a text string like this: from -32768 to 32767? The predefined abbreviation of a character class of all decimal digits is \d, wh...
2013-01-23, 2480👍, 0💬

Escape sequence - New Line character \n
What is the escape sequence for the New Line or Line Feed character? How to write a regular expression to capture the last character before the New Line character? The escape sequence for the New Line or Line Feed character is \n, which is the same as \x0A. The regular expression to capture the last...
2013-01-26, 2479👍, 0💬

Quoted sequence \Q...\E
What is the quoted sequence to disable pattern metacharacters? How to write a regular expression to capture the main() method in a Java class like: class ABC { public static void main(String args[]){...} } The quoted sequence is a subpattern where pattern metacharacters are treated literally. A quot...
2013-01-26, 2455👍, 0💬

Word character class - \w
What is abbreviation of a character class of all word characters? Does it represents any alphanumeric plus '_' characters? How to write a regular expression using a character class abbreviation to capture all words in a PHP script code like this: function get($key) {if (array_key_exists($key,$_POST) ...
2013-01-23, 2453👍, 0💬

Escape sequence - Tab character \t
What is the escape sequence for the Tab character? How to write a regular expression to captures tab delimited fields like this: Milk $0.99 No tax? The escape sequence for the Tag character is \t, which is the same as \x09. The regular expression to capture tab delimited fields is: ([^\t]*+)\t? [^\t...
2013-01-26, 2442👍, 0💬

Negative look-ahead assertion (?!...)
What is a negative look-ahead assertion? How to use it? How to write a regular expression to find words without 'oo' in text like: how, to, look, google, school? A negative look-ahead assertion is a zero-width assertion that allows you to not match a subpattern beyond the current position (look-ahea...
2013-01-26, 2404👍, 0💬

Does negative character class match newline
Does negative character class [^a] match newline characters? How to write a regular expression to capture tags and attributes from this HTML code: A negative character class will match the newline character, if the newline character is not listed in the class. For example, "[^a]" will match the newl...
2013-02-02, 2380👍, 0💬

Negated decimal digit character class - \D
What is abbreviation of a negated character class of all decimal digits? Does it represents any characters except decimal digits? How to write a regular expression using a character class abbreviation to capture letters from a Canadian postal code string: L3R 9Z7? The predefined abbreviation of a ne...
2013-01-23, 2344👍, 0💬

Using character range in a character classe [a-z]
What is a character range in a character class? How to specify a character range in a character class in a regular expression? I have a string of hexadecimal digits, 46594963656E7465722E636F6D and want to use character ranges in a character class to validate it. A character range defines a set of po...
2013-01-22, 2333👍, 0💬

Negated white space character class - \S
What is abbreviation of a negated character class of all white space ASCII characters? Does it represents any characters except white space characters? How to write a regular expression using a character class abbreviation to capture tokens separated by white space characters in a text string like t...
2013-01-23, 2324👍, 0💬

1 2 >   Sort: Date