wood burning stoves 2.0*
The moose likes Linux / UNIX and the fly likes named character classes in grep Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "named character classes in grep" Watch "named character classes in grep" New topic

named character classes in grep

minal silimkar
Ranch Hand

Joined: Nov 25, 2007
Posts: 133
I want to know how to use named charactes classes with grep command?

Minal Silimkar
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15959

Character-class pattern for USA format date string (MM/DD/YYYY):


Which is equivalent to


Or \d{2}/\d{2}\/d{4}

Except that character classes may be more locale-sensitive, if I understood them correctly.

Another benefit of the named classes is that backslashes can bite.
[ April 18, 2008: Message edited by: Tim Holloway ]

Customer surveys are for companies who didn't pay proper attention to begin with.
minal silimkar
Ranch Hand

Joined: Nov 25, 2007
Posts: 133
How can I use the named character constants with grep command?
I agree. Here's the link: http://aspose.com/file-tools
subject: named character classes in grep
Similar Threads
Command to add lines to multiple files
Search tool to search all class files
struts2: Generating list of localisation keys?
File find utility?
Maintaining File Size while writing