...

View Full Version : preg_replace $pattern help



Inersha
08-01-2008, 11:30 PM
I've been looking at the preg_replace() function, but I just can't seem to figure out the $pattern part to look for the things to replace.

There are back slashes and square brackets involved in this part amongst other things, and I can't find any articles or tutorials on how it works.

Does anyone have any links on how to construct this part, or would like to give me a quick crash course on how to construct it?

oesxyl
08-02-2008, 12:12 AM
I've been looking at the preg_replace() function, but I just can't seem to figure out the $pattern part to look for the things to replace.

There are back slashes and square brackets involved in this part amongst other things, and I can't find any articles or tutorials on how it works.

Does anyone have any links on how to construct this part, or would like to give me a quick crash course on how to construct it?
I don't know how it is, I just search for regex +tutorial with google:

http://www.regular-expressions.info/quickstart.html

once you have a basic understanding the manual is pretty clear, some experiments and post specific question in this forum.

regards



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum