Re: Removing UTF-8 from text
| From: | Chris | Date: | Thu, 04 Jan 2007 06:40:17 +0000 |
| Subject: | Re: Removing UTF-8 from text | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-246501@lists.php.net to get a copy of this message | ||
Dotan Cohen wrote:
On 03/01/07, Richard Lynch <ceo@l-i-e.com> wrote:http://www.php.net/manual/en/reference.pcre.pattern.modifiers.php lists what the modifiers do. As others have mentioned, you can use anything as delimiters. Sometimes it's easier to change the delimiter rather than worrying about escaping it - for example when doing a regex for urls.. so instead of: /http:\/\/ etc etc / (hard to read) change the delimiters: #http:// etc etc # -- Postgresql & php tutorials http://www.designmagick.com/Instead of trying to strip the UTF stuff out, try to capture the part you want: preg_match_all('|<[^>]>|ms', $emails, $output); var_dump($output);Richard, I do have a working script now, but I'm intrigued by your regex. Why do you surround the needle with pipes, and what is the "ms" for?