Need a simple regex

Any questions involving matching text strings to patterns - the pattern is called a "regular expression."

Moderator: General Moderators

Post Reply
klevis miho
Forum Contributor
Posts: 413
Joined: Wed Oct 29, 2008 2:59 pm
Location: Albania
Contact:

Need a simple regex

Post by klevis miho »

Ok the string is like this:

$string = 'Expiration date: bla bla <br>Expire on: bla bla <br> expire: bla bla <br>';

I want a regex to catch just the 'bla bla'.

What I have is this: '#Expir(.+?)<br>' which doesn't give me the desired result.

I would appreciate any help and suggestion.
klevis miho
Forum Contributor
Posts: 413
Joined: Wed Oct 29, 2008 2:59 pm
Location: Albania
Contact:

Re: Need a simple regex

Post by klevis miho »

Ok no need now, I figured it out myself lol:

'#exp[a-z\s]+:(.+?)<br />#si'
Post Reply