c# - RegEx Expression Help -


I need a regular expression that will not tell anyone that the word 'box' or 'type in the box' or After 'box' numbers To complete both the conditions for work, the word box and number one or the other, do not anyone have to write it?

Edit:

O people, I have tried something and the problem is that 1234 S. I want to stop it, if user p.o. Box 1234. We are searching for anything with the word 'box' and after this the number should not be accepted.

Thank you

The edit was made after the question:

  New Reggae (@ "\ bbox \ s * \ d +", ignore the RegexOptions case);  

This will match "box" as a word, alternatively after white space, after a number, anywhere in the input string. Then this match will be:

  • Box 12
  • Box 12
  • Drink Box 12A
  • Box 12A

This will not match:

  • Box12
  • Boombox 12 < / P>
  • Box Pog

(This would be very useful if your original question told you what you were trying to actually do!)


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -