Regular Expression Q
Regular Expression Q
- Started
- Last post
- 1 Response
- morphinelips
I have a decent understanding of regular expressions as used in perl, or in my case in a preg_replace function in php. I am using the following code:
$pattern = '#(.+?)#';
To take out the contents of an href tag. The problem is, when I have embedded code such as:
bla
bla
blaThe (.+?) swallows up all of the code until the last . Does anyone know a reg ex expression that will stop when it encounters the first
Thanks!
- morphinelips0
the Reg Ex didn't come out so good. basically the question is concerning the (.+?) part, does anyone know who to make the (.+?) stop gobbling up the string when it encounters the first end tag, instead of the last one?