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

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, 2961👍, 0💬

Parsing key-value entries from Windows .INI files
How to write a regular expression to parse key-value entries from Windows .INI files? Here is an example Windows .INI file, system.ini:; for 16-bit app support [386Enh] woafont=dosapp.fon EGA80WOA.FON=EGA80WOA.FON EGA40WOA.FON=EGA40WOA.FON CGA80WOA.FON=CGA80WOA.FON CGA40WOA.FON=CGA40WOA.FON [drivers...
2013-02-01, 3909👍, 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, 11532👍, 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, 2696👍, 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, 2412👍, 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, 2047👍, 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, 2804👍, 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, 2573👍, 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, 2298👍, 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, 1994👍, 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, 2116👍, 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, 1996👍, 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, 1944👍, 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, 2065👍, 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, 2860👍, 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, 1918👍, 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, 1951👍, 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, 1955👍, 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, 1976👍, 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, 5498👍, 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, 2004👍, 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, 1916👍, 0💬

US post code validation
How to perform a validation on US post codes using a regular expression? For example, "12345-5434" is an valid US post code. To perform a validation on US post codes, try this regular expression: ^([0-9]{5})(-[0-9]{4})?$
2013-01-27, 1948👍, 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, 2076👍, 0💬

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