June 25th, 2000, 11:47 AM
The code below strips out eg, [<a href etc...</a>] (the square brackets are part of the string) - but when there is more than one occurance of the [<a....>/] code the ereg_replace only works once , starting with the first [<a and ending with the last a>] missing all the other occurences in the middle. the code;
$boo= eregi_replace( "[<A(.*)A>]", " ", $plain );
If the string to stip was always the same I would use str_replace() ,but it is not although it will always start with [<a and end with a>].
Any links on tutorials/explanations of regex would be appreciated - I have read the manual but obviously I am not quite getting it.
June 25th, 2000, 12:23 PM
Search for "regex" and/or "posix" in the forums at http://phpbuilder.com/ (when the site starts responding again).