1 2 >   Sort: Rank

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, 4760👍, 1💬

Strings Containing Neither A Nor B
How to match strings that contain neither A nor B using regex? Regular Expression does not support NOT operator on a sub pattern. "Neither A nor B" must be implemented by a "Negative Look-Ahead" assertion. Let's assume that we have following text: Answer is A. Answer is D. Answer is B. Answer is C. ...
2016-06-23, 785👍, 0💬

Regular Expression with Logical AND
How to write AND logic in regular expression? How to build a regular expression to identify the following email paragraph as a spam message because it contains the word "bank", "account" and "money"? "I am inviting you for a business deal where this money will be shared between of us in the ratio of...
2015-05-22, 1666👍, 0💬

Case insensitive modifier - i
What is case insensitive modifier? How to use it? How to write a regular expression to capture the "DIM" key word from this code example:Dim intArray(10, 10, 10) As Integer ReDim Preserve intArray(10, 10, 20) ReDIM Preserve intArray(10, 10, 15) Redim intArray(10, 10, 10) The regular expression to ca...
2013-02-03, 2027👍, 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, 2064👍, 0💬

Using multiple lines and single line modifiers together - ms
What happens if I use multiple lines modifier, m, and single line modifier, s, together? How to write a regular expression to capture each bullet statement from this sample text:- The DAEMON or VENDOR label. - If the path is missing or incorrect, the product placed in the same directory as the x dae...
2013-02-02, 1999👍, 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, 2203👍, 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, 2702👍, 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, 2313👍, 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, 2226👍, 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, 2449👍, 0💬

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, 2865👍, 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, 2602👍, 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, 2339👍, 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, 2119👍, 0💬

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

None capturing group (?:...)
Is there any to stop capturing a group to improve matching performance? How to write a possessive quantified subpattern to match double-quoted strings like this: "He said: \“Hello!\”"? Yes. To turn the default capturing behavior on a group, you can entered '?:' at the beginning of the group as (?#:....
2013-01-26, 1927👍, 0💬

Comments in regular expression (?#...)
Is there any way to enter a comment into regular expressions? How to write a regular expression with comments to match date strings in yyyy-mm-dd format like: 2013-01-26 Yes. Comments can be entered in regular expressions using (?#...) format. For example: "(?:[^"\]++(?#no-backtracking) |\.)*+(?#no-b...
2013-01-26, 1935👍, 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, 2086👍, 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, 2271👍, 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, 2296👍, 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, 2111👍, 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, 2303👍, 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, 2081👍, 0💬

1 2 >   Sort: Rank