Re: [PHP] regex/preg_replace() difficulty

2003-10-01 Thread CPT John W. Holmes
From: <[EMAIL PROTECTED]> > Regular Expressions: How can I indicate that the contents of a term > (user input*) needs to be treated as 'non-operators/control characters' > (as *word* to match in that exact way)? > (* Because the term is a user's input I can't escape the control > characters man

Re: [PHP] regex/preg_replace() difficulty

2003-10-01 Thread Marek Kilimajer
You can escape the control characters manualy ;) $termWithOptionalBold=str_replace(array('.','\','$' ),array('\.','\\','\$' ), $termWithOptionalBold); [EMAIL PROTECTED] wrote: Regular Expressions: How can I indicate that the contents of a term (user input*) needs to be treated as 'non-

[PHP] regex/preg_replace() difficulty

2003-10-01 Thread jonas_weber
Regular Expressions: How can I indicate that the contents of a term (user input*) needs to be treated as 'non-operators/control characters' (as *word* to match in that exact way)? (* Because the term is a user's input I can't escape the control characters manually.) Example: $result = preg_rep

Re: [PHP] regex (preg_replace)

2002-05-18 Thread Gerard Samuel
I figured it out. Change the last line to echo htmlspecialchars($b); and you'll get the proper output. Gerard Samuel wrote: > Im trying to get a final output to be '' but Im unable to get > working. Could someone point me where Im going wrong. > Thanks > > > $a = 'http://www.trini0.org";>';

[PHP] regex (preg_replace)

2002-05-18 Thread Gerard Samuel
Im trying to get a final output to be '' but Im unable to get working. Could someone point me where Im going wrong. Thanks http://www.trini0.org";>'; $b = preg_replace("/()/i", "$1" . "$3", $a ); echo $b; ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://ww