PHP regex how to replace with the same string
Posted on 2014-11-19
the following statement works:
where search_string is what is being searched for, and 'title'
is the LIKE-matching result from a mysql database.
currently the regex substitutes the CASE that was used as typed in by the searcher.
I would like to have the CASE retained to that of what the field was in the database
(could be lower, initial cap, all caps, etc.)
how can the regex substitution (which surrounds the title search phrase with HTML tags for highlighting)
be altered to retain the the capitalization in the returned field result.