Forum Moderators: phranque

Message Too Old, No Replies

need help with reg. expressions

need to define if thestring is like /support/index.php

         

semya

9:38 am on Jan 17, 2003 (gmt 0)

10+ Year Member



I saw a tiny interesting script in DOM/JScript helping to validate html-forms on client-side, but it uses regular expressions, which i'm not much awared of. so, please, help me build a regular expression to define if a string is input like the following pattern: /support/index.php

so:
1) if it starts with /
2) consists only of letters and digits and _
3) and the last combination /____ . ___ can have 1 point...

thanks...

andreasfriedrich

9:56 am on Jan 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Have a look at this excellent tutorial on Using Regular Expressions [etext.lib.virginia.edu].

Andreas

semya

10:13 am on Jan 17, 2003 (gmt 0)

10+ Year Member



Thanks a lot! I'm reviewing it right now, hope it'llhelp me...

but what about a hint concerning this particular regexp?

thanks