Hello all,
I’ve seen the following code in xbloglite:
[code=php]$entry = preg_replace(“/[b](.*?)[/b]/i”,”<strong>$1</strong>”,$entry);
Now, I know how to implement this, and it has been very useful- but I don’t really understand how it works, and haven’t seen an explanation of it in any RegEx tutorial.
Of course, I only read the simple things, and this is probably a combination of more advanced techniques (which are beyond me), but I would still like to know how it works exactly, seeing as I’m only writing PHP to learn.
Anyone who has the patience enough with my newbishness to help me out here, I thank in advance. ?
EDIT: Realized I didn’t directly state that I understood the word boundary, //, or the i after the word boundary to make it disregard about the case of the text string contained within (as much of a technical definition as I can offer).