.NET Framework Bookmark and Share   
 index > Regular Expressions > Regex pattern
 

Regex pattern

Hi waht will be the regex pattern for string like this

P123
P45
P7865

I want to know what is the regex pattern for word which have P followed by any numbers.

Thank you

kayatri

P\d*

The literal "P" followed by any digit \w plus the star [zero or more occurrences]


if you use: P\w+ you are saying the literal "P" followed by a digit [ONE or more occurrences]
John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
JohnGrove

You can use google to search for other answers

Custom Search

More Threads

• match.value not cleared??
• PostScript File With Regex
• Very basic question
• Match a single word
• Multiline Option appears not to work.
• trouble testing two consecutive characters using regex
• Regular expression to find the difference
• Padding left with zeros
• Regasm newbie probably easy question
• Skip escaped double quote-entity