CARVIEW |
Top Contributors
-
86 Answers
-
56 Answers
-
28 Answers
-
26 Answers
-
23 Answers
Topics: python
-
0VOTES0ALTERNATES
How to remove duplicate lines with regular expressions
By StevenLevithanThere is a variety of software (including the Unix command-line utility uniq and Windows PowerShell cmdlet Get-Unique) that can help you remove duplicate lines in a file or ...
30 October 2009 - 08:35 AM | 0 Comments
Tags:
-
1VOTES0ALTERNATES
-
1VOTES0ALTERNATES
How to Match IPv4 Addresses with Regular Expressions
By Jan GoyvaertsIf you want to check whether a certain string represents a valid IPv4 address in 255.255.255.255 notation, try one of these examples from Regular Expressions Cookbook: Simple regex to check fo...
30 September 2009 - 01:11 PM | 0 Comments
Tags:
-
1VOTES0ALTERNATES
How to validate traditional date formats with regular expressions
By Jan GoyvaertsIf you want to validate dates in the traditional formats mm/dd/yy, mm/dd/yyyy, dd/mm/yy, and dd/mm/yyyy, using a simple regex that simply checks whether the input looks ...
18 September 2009 - 12:45 PM | 0 Comments
Tags:
-
0VOTES0ALTERNATES
-
1VOTES0ALTERNATES
-
1VOTES0ALTERNATES
How to replace all matches in a regular expression
By Jan GoyvaertsIf you want to replace all matches of the regular expression before with the replacement text after, try one of the following examples:C#You can use the static call when you process on...
18 September 2009 - 09:56 AM | 0 Comments
Tags:
-
1VOTES0ALTERNATES
How to find a match within another match in a regular expression
By Jan GoyvaertsSuppose you have an HTML file in which various passages are marked as bold with <b> tags. You want to find all numbers marked as bold. If some bold text contains multiple numbers, you want to ma...
17 September 2009 - 04:46 PM | 0 Comments
Tags:
-
1VOTES0ALTERNATES
How to match whole words with a regular expression
By Jan GoyvaertsCreate a regex that matches cat in My cat is brown, but not in category or bobcat. Create another regex that matches cat in staccato, but not in any of the three previous subject str...
16 September 2009 - 03:20 PM | 0 Comments
Tags:
-
0VOTES0ALTERNATES
How to match something at the Start and/or End of a line with a regular expression
By Jan GoyvaertsCreate four regular expressions. Match the word alpha, but only if it occurs at the very beginning of the subject text. Match the word omega, but only if it occurs at the very e...
16 September 2009 - 02:18 PM | 0 Comments
Tags:
![]() ©2009, O'Reilly Media, Inc. (707) 827-7000 / (800) 998-9938 All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners. |
About O'Reilly Academic Solutions Authors Contacts Customer Service Jobs Newsletters O'Reilly Labs Press Room Privacy Policy RSS Feeds Terms of Service User Groups Writing for O'Reilly |
Content Archive Business Technology Computer Technology Microsoft Mobile Network Operating System Digital Photography Programming Software Web Web Design |
More O'Reilly Sites O'Reilly Radar Ignite Tools of Change for Publishing Digital Media Inside iPhone O'Reilly FYI makezine.com craftzine.com hackszine.com perl.com xml.com Partner Sites InsideRIA java.net O'Reilly Insights on Forbes.com |