Your question, your audience. Choose who sees your identity—and your question—with question security.
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Open in new window
will give you a match if there is ANY whitespace between the numbers and lettersOpen in new window
will give you a match if there are exactly zero or one whitespace characters between the numbers and lettersIf you're specifically looking for the space character (ascii value 32) and not any whitespace (which can include tabs, new lines, or other whitespace depending on regex options) then you could do this:
Open in new window
Or even more explicitly, call out the octal ASCII value of the space character like this:Open in new window
I could probably keep coming up with variants that would serve your needs. Regex is extremely flexible. Let me know if you need more than above.By the way, the Regex you provided would only match "18A" on the string "18ABC". It would not match "18ABC". For that you'd need to include a trailing asterisk which means [zero or more repetitions].