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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

regular expressions for folder name

Status
Not open for further replies.

stevet26

Programmer
Feb 9, 2005
53
I have come up with a regular expression.

\w+\137+

This allows 'newFolder_' but not 'newFolder_New', 'newFolder_New_New' or just 'newFolder'

What I am trying to achive is regular expression which checks that only numbers, letters and _ have been used in the string. So, that all of the above examples would be accepted.

I have tried a number of combinations but I just can't work this out. Any help would be much appreciated.

Thanks in advance.
 
I find regular expressions confusing a lot of the time as well! Try using a program such as the one found at which has come in handy for me.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top