If you're using the preg_* functions, you can specify that it should  
use multilines by using /<em>test[\s\r\n]*<\/em>/m as the match  
string. (Note the m outside the delimiters)

For more information, check out 
http://nz.php.net/reference.pcre.pattern.modifiers

On 11/09/2008, at 5:55, mikael letang wrote:

> regex works on single line, you can t put newline in it (if I am not
> mistaken)
>
> maybe you can replace the newline with a special char, do your  
> search and
> replace back the newline. There s probably a cleaner way though
>
> 2008/9/11 Michael Brandon <[EMAIL PROTECTED]>
>
>>
>> Just a quickie
>>
>> If I want to find instances of the following in text, what is the  
>> regex to
>> find it:
>>
>> "<em>test
>>
>> Only</em>"
>>
>> Something like <em>test[\s\r\n]*Only</em>
>>
>> I just can't seem to get it working when the carriage return is in  
>> there.
>>
>> Yes, I am using regexbuddy...
>>
>> Thanks guys
>>
>> Regards
>> Michael
>>
>>
>>
>>>
>>
>
> >

---
Simon Welsh
Admin of http://simon.geek.nz/

Who said Microsoft never created a bug-free program? The blue screen  
never, ever crashes!

http://www.thinkgeek.com/brain/gimme.cgi?wid=81d520e5e





--~--~---------~--~----~------------~-------~--~----~
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[EMAIL PROTECTED]
-~----------~----~----~----~------~----~------~--~---

Reply via email to