Character Classes

Any questions involving matching text strings to patterns - the pattern is called a "regular expression."

Moderator: General Moderators

Post Reply
User avatar
dhrosti
Forum Commoner
Posts: 90
Joined: Wed Jan 10, 2007 5:01 am
Location: Leeds, UK

Character Classes

Post by dhrosti »

Is there a reason why I don't see many examples of people using character classes like [[:alnum:]] in regex patterns? Is it not as flexible as building the patterns by hand or something?
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

isn't that the same as \d ?
User avatar
dhrosti
Forum Commoner
Posts: 90
Joined: Wed Jan 10, 2007 5:01 am
Location: Leeds, UK

Post by dhrosti »

Its identical to [A-Za-z0-9]. Maybe its just the POSIX way of doing things...
Post Reply