Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Regular Expressions quick question

Status
Not open for further replies.

emblewembl

Programmer
Joined
May 16, 2002
Messages
171
Location
GB
I am using regular Expressions an need to know how I can search for a '-'. If I am looking for any character i use:

[a-zA-Z0-9]

If I'm looking for any character or an apostrophe I use;

[a-zA-Z0-9']

But How do I get it to look for a dash?

Thanks!
 
[-a-zA-Z0-9] The hyphen as the 1st character of a range is not special.

db
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top