Re: php regexp question
| From: | Marek Kilimajer | Date: | Tue, 25 Mar 2003 15:25:29 +0000 |
| Subject: | Re: php regexp question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-140968@lists.php.net to get a copy of this message | ||
Just an idea:
In $string replace any occurence of ç to c, search for offsets of francoise, and then add bold tags at the offsets (and end tags at offsets +strlen('francoise')) in the original string.
cpaul wrote:
hi i've made a small php site that is searching against french documents stored in a mysql database. when it comes to rendering search results, the client has asked if the words that were searched for can be highlighted. "no problem!" i thought. just do a regexp replace and wrap a <b> tag around the matching terms. then i realised that the following would not produce a match: $string = "Françoise"; echo preg_match("/francoise/i",$string); so my question.... since mysql managed to produce a match here, is there perhaps a php regexp modifier that (maybe) knows how to make this match? thanks