O'Reilly Answers is a community site for sharing knowledge, asking questions, and providing answers that brings together our customers, authors, editors, conference speakers, and Foo (Friends of O'Reilly). More »
There 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
...
If 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 ...
Create 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...
Create 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...
The following are common uses for Unicode code points, properties, blocks and scripts:
Use a regular expression to find the trademark sign (™) by specifying its Unicode code point
...
Let's match a string of the ASCII control characters: bell, escape, form
feed, line feed, carriage return, horizontal tab, vertical tab. These
characters have the hexadecimal A...