0

I have this long string value:

"10 12 10/05/2014 p4=34"

I would like to get only the two digit numbers (underlined):

"10 12 10/05/2014 p4=34"
 -- --               -- 

So the result should be

10 12 34
MRK
  • 63
  • 4
  • 1
    What's wrong with the first 34? – elixenide Jan 25 '15 at 06:58
  • Your definition of "not part of a date" is **way** to vague. What's a date? What does "not part of" mean? The form of the question suggests that you did not spend enough time to define the problem space and that you did not try anything yourself. – Tomalak Jan 25 '15 at 07:11
  • Ed, sorry for little misspell, I fixed it – MRK Jan 25 '15 at 07:12

1 Answers1

1

Have a try with:

(?<![\d/])\d\d(?![\d/])

Where:

(?<![\d/])  : negative lookbehind, assumes there're no digits nor slashes before.
\d\d        : 2 digits.
(?![\d/])   : negative lookahead, assumes there're no digits nor slashes after.
Toto
  • 89,455
  • 62
  • 89
  • 125