|
-
Aug 4th, 2003, 03:43 PM
#1
Thread Starter
Stuck in the 80s
[Resolved] Regular Expressions...
I'm trying to run this code:
Code:
$msg = preg_replace('/\[\*\](.*)/siU', '<li>\\1</li>', $msg);
And for some reason, it's replacing this:
With
??
Last edited by The Hobo; Aug 11th, 2003 at 12:33 PM.
-
Aug 5th, 2003, 03:12 PM
#2
Frenzied Member
works for me, bu tafter looking at the source I see it does what you got.
<li></li>text
let me look deeper.
-
Aug 5th, 2003, 03:15 PM
#3
Frenzied Member
take the U off the end of the reg. exp.
-
Aug 6th, 2003, 10:52 PM
#4
Thread Starter
Stuck in the 80s
That fixes, that, but now, when I have:
It does something like:
<li>text[*]text[*]text</li>
-
Aug 6th, 2003, 10:59 PM
#5
Thread Starter
Stuck in the 80s
It seems to work fine if I use an end tag [/*]:
Code:
$msg = preg_replace('/\[\*\](.*)\[\/\*\]/isU', '<li>\\1</li>', $msg);
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|