Street and (maybe) Date
Posted: Wed Mar 25, 2009 2:00 pm
Hey,
I want to extract a Street and a Date (not always) from a String via preg_match.
Example strings:
or
I tried different regexes, but they matched either the string with time or just without the time, problem seems to be the space between
the street and the time, which isn't there, when there's no time. I tried
or
or
Any ideas?
TIA,
waquner
I want to extract a Street and a Date (not always) from a String via preg_match.
Example strings:
Code: Select all
mpark Musterstreet 12 9:00Code: Select all
mpark Musterstreet 12the street and the time, which isn't there, when there's no time. I tried
Code: Select all
mpark (.*)\s?((.{1,2}):(.{1,2}))?Code: Select all
mparkplatz (.*)\s?((\d*):(\d*))?Code: Select all
mparkplatz (.*) ((\d*):(\d*))?TIA,
waquner