<< < 1 2 3 4 5 6 > >>   Sort: Rank

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, 3100👍, 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, 2742👍, 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, 2592👍, 0💬

Parsing directory name and size from Windows "dir" command
How to write a regular expression to parse directory name and total file size from the output of Windows "dir" command? Here is an example output of the "dir" command:Directory of C:\Windows\system 07/13/2009 11:52 PM . 07/13/2009 11:52 PM .. 06/10/2009 04:21 PM 69,584 avicap.dll 06/10/2009 04:21 PM...
2013-02-01, 3841👍, 0💬

Validating GUID or UUID
How to write a regular expression to validate GUID (Globally Unique IDentifier) or UUID (Universally Unique IDentifier)? Here is a list of good and bad GUID examples:{D1A5279D-B27D-4CD4-A 05E-EFDD53D08E8D}{594ABD08-C02C-4827-8ABF-A1280 06848A3}{B59511BD6A5F4DF09ECF562A108D8 A2E}69593D62-71EA-4548-85...
2013-02-01, 16125👍, 0💬

RegexMagic: Regular Expression Generator
What is RegexMagic? RegexMagic makes creating regular expressions easier than ever. While other regex tools such as RegexBuddy merely make it easier to work with regular expressions, with RegexMagic you don't have to deal with the regular expression syntax at all. RegexMagic generates complete regul...
2013-02-01, 3296👍, 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, 2848👍, 0💬

Parsing header lines of an email message
How write a regular expression to capture all header lines from an email message like this: Return-Path: X-Original-To: test@example.com Delivered-To: test@example.com Message-ID: Date: Thu, 23 Jun 2011 11:26:29 +0200 From: Example Sender To: Example Receiver Subject: Email example Hello Joe, It was...
2013-02-01, 2378👍, 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, 3500👍, 0💬

Positive look-behind assertion (?&lt;=...)
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, 2914👍, 0💬

Negative look-behind assertion (?&lt;!...)
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, 2722👍, 0💬

Parsing the "To:" field from emails
What would be the correct regex pattern to extract email addresses from a string coming from an email form "To" line, that allows the addresses to be delimited by commas ",", semicolons ";", or spaces? For example, the following "To" line contains 4 email addresses: "Joe Smith" , joe@aol.com; someon...
2013-01-30, 2337👍, 0💬

Validating Brazilian Postcodes
How to write a regular expression to validate Brazilian Postcodes? For example, 23080-060 is a valid Brazilian Postcodes. Here is the regular expression to validate Brazilian Postcodes: \d{5}-\d{3} \d{5} - 2 digits - - A - \d{3} - 3 digits
2013-01-29, 2493👍, 0💬

Validating United Kingdom postcodes
How to write a regular expression to validate United Kingdom postcodes? For example, EC1A 1BB is a valid UK postcodes. Here is the regular expression to validate United Kingdom postcodes: [A-Z]{1,2}\d[A-Z\d]? \d[ABD-HJLNP-UW-Z]{2} [A-Z]{1,2} - 1 or 2 letters \d - A digit [A-Z\d]? - An optional lette...
2013-01-29, 2285👍, 0💬

Validating Canadian Postal Codes
How to write a regular expression to validate Canadian Postal Codes? For example, T2X 1V4 is a valid Canadian postal codes. Here is the regular expression to validate Canadian postal codes: [ABCEGHJKLMNPRSTVXY]\d[A-Z] ?\d[A-Z]\d [ABCEGHJKLMNPRSTVXY] - 18 FSA possible letters \d - A digit [A-Z] - Any...
2013-01-29, 2232👍, 0💬

Validating Complexity and Length of Passwords
How to write a regular expression to check the complexity and length of passwords with the following requirements: Password must be at least 6 characters long Password must include at least including 1 upper case letter Password must include at least including 1 lower case letter Password must inclu...
2013-01-29, 2481👍, 0💬

Detecting missing closing parenthesis in program code
How to detect missing closing parenthesis in program code using regular expression? For example, I have the following program code: n = - (LN(1-(B/m)*(r/q))/LN(1+(r/q)) ;Can anyone help?
2013-01-29, 3356👍, 0💬

Finding content between two quotes
How to find content between two quotes in a text string using regular expression? For example, I have the following string: print "\$45.00\n"; Here is the regular expression to capture the content between two quotes: "([^"]*)"
2013-01-29, 2311👍, 0💬

Finding blank lines in a text file
How to find blank lines in a text file using regular expression? You can use the following logic to find blank lines in a text file: 1. Read each line from the text file in a loop. 2. Validate each line with this regular expression: ^\s*$ 3. If matched, you know that this line is a blank line.
2013-01-29, 2334👍, 0💬

Web address URL validation
How to perform a validation on Web address URLs using a regular expression? For example, "http://regex.fyicenter.com/" is a valid Web address URL. To perform a basic validation on Web address URLs, try this regular expression: ^https?:\/\/([A-Z0-9][-\w]*(\. [A-Z0-9][-\w]*)+):?(\d+)?\/?
2013-01-27, 2350👍, 0💬

US Social Security Number validation
How to perform a validation on US Social Security Numbers using a regular expression? For example, "333-23-2329" is a valid US Social Security Number. To perform a basic validation on US Social Security Numbers, try this regular expression: ^[\d]{3}-[\d]{2}-[\d]{4}$
2013-01-27, 2314👍, 0💬

Email addresse basic validation
How to perform a basic validation on email address using a regular expression? For example, "test+email@fexample.com" is an invalid email address. To perform a basic validation on email addresses, try this regular expression: ^\D\w+(\.\w+)*[@]\w+(\.\w+)*\. [a-zA-Z]{2,4}$
2013-01-27, 6443👍, 0💬

US phone number validation
How to perform a validation on US phone numbers using a regular expression? For example, "(021)423-2323" is an valid US phone number. To perform a validation on US phone numbers, try this regular expression: ^\(?\d{3}\)?[-\s.]?\d{3}[-\s.] \d{4}$
2013-01-27, 2475👍, 0💬

IP address validation
How to perform a validation on IP addresses using a regular expression? For example, "198.168.1.78" is an valid IP address. To perform a validation on IP addresses, try this regular expression: ^(([1-9]?\d|1\d{2}|2[0-4]\d|25 [0-5]).){3}([1-9]?\d|1\d{2}|2[ 0-4]\d|25[0-5])$
2013-01-27, 2336👍, 0💬

<< < 1 2 3 4 5 6 > >>   Sort: Rank