Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

preg_replace

Status
Not open for further replies.

801119

Programmer
Apr 10, 2000
311
SE
Greetings all,

I know preg_replace has been discussed several times, I'm not gonna ask for anything less than HELP! :D *lol*

I can't figure out how it works.. anyone can point me to a VERY good tutorial.

it's the $what and $with I don't understand :(
preg_replace($what,$with,$in_string);

My codes look like something a kid wrote
I have absolutely no idea what I am talking about
Somehow I still manage to make it work
 
The crux of the matter is learning perl-compatible regular expressions, which can be hard to get your head around. The Apache webserver provides a module called mod_rewrite that uses regular expressions to rewrite and redirect user requests. The famous quote about mod_rewrite is "Despite the tons of examples and docs, mod_rewrite is voodoo. Damned cool voodoo, but still voodoo."


Here's a tutorial which talks about regular expressions in relation to PHP functions:
There's the horse's mouth, the perl documentation:
There's

I found these and a lot more with the Google earch expression: "regular expressions" tutorial examples

Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top