Welcome to WebmasterWorld Guest from

Forum Moderators: ocean10000

Message Too Old, No Replies

Regular Expression

Simple String Match



8:57 am on Apr 14, 2005 (gmt 0)

10+ Year Member


Im working in .NET and im trying to make sure a reference entered by the user is in the correct format before using the number part of it to look up their details. Im trying to match all strings that start with WEB and are followed by a number and I want to then use the number.

I have: WEB\d as my regular expression and although this matches what I want it also lets through strings such as: "WEB1 t" and "WEB1 WEB2", which I don't want.

Please tell me what else I should do to my pattern string to get this to work. I have been researching this but im just not feeling "IT" this morning.



9:24 am on Apr 14, 2005 (gmt 0)

10+ Year Member


I got it its the $ at the end to signify the end of the string. A cup of coffee and a post here clears the head i suppose.

Cheers anayway


Featured Threads

Hot Threads This Week

Hot Threads This Month