I would like to match the time (10.00) from a string with the date and time ("21.01.08 10.00"). I'm using the following regular expression:
new RegExp("\\b[0-9]{1,2}\\.[0-9]{1,2}\\b" "g");
But this matches 21.01 from 21.01.08 and 10.00.
I'm using PCRE as my regualar expression engine.
Update:
I'm sorry, i should have more been more clear. The data and time are part of a larger string. I want to extract the time from that string.
For example:
"On 21.01.08 from 10.00 a party will take place in the library" "21.08.08 - At 10:00 there will be a party" "On 21.08.08 you are scheduled for a ... . The ... will begin at 10.00"
Is this possible?