Need PHP Reg Expression preg_replace help
Posted: Tue Aug 30, 2011 11:34 pm
The FULL STRING passed in has the variable: $message;
I am trying to find:
#string1_with_nums_and_chars
and
@string2_with_nums_and_chars
Then, each time one of these characters is found, it will be replaced by it's own URL.
Example Output for #:
<a href="http://www.somesite.com/something?q=str ... d_chars</a>
Example Output for @:
<a href="http://www.somesite.com/watch?string2_w ... d_chars</a>
The length of each string is unknown and the string's are dynamic.
I am trying to find:
#string1_with_nums_and_chars
and
@string2_with_nums_and_chars
Then, each time one of these characters is found, it will be replaced by it's own URL.
Example Output for #:
<a href="http://www.somesite.com/something?q=str ... d_chars</a>
Example Output for @:
<a href="http://www.somesite.com/watch?string2_w ... d_chars</a>
The length of each string is unknown and the string's are dynamic.