Regex that will specify space or no  space

John Carney
John Carney used Ask the Experts™
on
Right now I have a very simple regex pattern of : .Pattern = "\d[A-M]+" I haven't used regex for about 3 years and i can't remember how to write it. I might have one or two other simple questions as well.

Thanks!
John
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
IT Guru
Most Valuable Expert 2011
Commented:
\s? will optionally match one whitespace character.
John CarneyReliability Business Tools Analyst II

Author

Commented:
Hi Terry, thanks. What would match one or more spaces?
ozo
Most Valuable Expert 2014
Top Expert 2015

Commented:
\s+ would match one or more spaces
Terry WoodsIT Guru
Most Valuable Expert 2011

Commented:
Thanks ozo...

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial