Link to home
Create AccountLog in
Avatar of John Carney
John CarneyFlag for United States of America

asked on

Modifying a RegEx pattern to work whether or not there is a space between two elements.

I have a regex pattern that picks up on strings containing a number followed by a letter or letters, but I need it to pick up on strings where there is a space between the number and the letters that come after it. My current pattern is this: s*\d{1,3}[A-M]. It will pick up 18ABC but not 18 ABC. I haven't used RegEx for a while and I can't remember how to write that.  I'm working in Excel if that makes a difference.

Thanks!

John
ASKER CERTIFIED SOLUTION
Avatar of Russ Suter
Russ Suter

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of John Carney

ASKER

That does it, Russ, thanks!