Hey folks,
I’m having a spot of trouble with a regular expression or two. In general, I’m trying to search/replace certain acronyms and abbreviations with their whole-word equivalents. So, for example, the following is one of my current replacements:
[code=php]$n = preg_replace(“/bsch{0,1}.{0,1}b/i”, “School”, $n);
However, the regular expression ignores the period in “[I]ABC Sch.[I]ABC School.
[B]{0,1}[I]should[U]as [B]I
Thanks!