Doug - Thank you for your help.
Doug Semler was able to solve my problem to some point but I still need some
help.
Doug's pattern is going to make sure that I don't get match of ddd dd
embeded in number. For example
1234 5678
I wanto match ddd dd but not if it has numbers directly to the left or right
of it.
Now I still need to be able to match ddd dd in text that consists of only
"123 45"; no spaces in front or at the end.
Thanks in advance.
-----------------
Original posts
Thank you for the tip.
The pattern you suggested fixes problem 12345 6789
but I still need to get match on string that has only 123 45
Is there any way to get them in one pattern?
Konrad.
"Doug Semler" <do********@gmail.comwrote in message
news:11**********************@r29g2000hsg.googlegr oups.com...
On Sep 7, 11:33 am, Doug Semler <dougsem...@gmail.comwrote:------------------------------------------------>On Sep 7, 11:16 am, "konrad Krupa" <kon...@commandtech.comwrote:
I'm not expert in Pattern Matching and it would take me a while to come
up
with the syntax for what I'm trying to do.
I hope there are some experts that can help me.I'm trying to match /d/d/d/s/d/d in any text.There could be spaces in front or after the pattern (the nnn nn could
be
without spaces also) but it shouldn't pick it up in case like this1234 56768above pattern would give me 234 56.If I do this /s/d/d/d/s/d/d/s
then I have to have spaces in front and after it, which is not the
case.Konrad.
howbout something like
[^\d]\d{3}\s+\d{2}
(Non digit followed by 3 digits followed by one or more whitespace
followed by 2 digits)
P.S. If you want to get only the digit match, you'll want to capture
it by sticking it into a catpuring group, like this:
[^\d](\d{3}\s+\d{2})
I'm pasting my initial question.