Re: RegEx Question
| From: | Christian Reiniger | Date: | Sun, 20 May 2001 17:34:36 +0000 |
| Subject: | Re: RegEx Question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-53619@lists.php.net to get a copy of this message | ||
On Sunday 20 May 2001 19:18, George E. Papadakis wrote:
> I have an ereg question::.
> $data = a big string ,
> while (ereg ("testing([^;]*);blah(.*)",$data,$args)) {
> $this = $args[1];
> $data = $args[2];
> }
>
> What I wanna do ,obviously, is to get all the strings between 'testng'
> and 'blah' in an array.
> This will do it, yet when it wont work when special chars such \n exist
> between 'testing' and 'blah'.
Use preg_match() with 's' or 'm' as modifier (one of these is correct...)
--
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)
The most exciting phrase to hear in science, the one that heralds new
discoveries, is not "Eureka", but "That's funny..."
- Isaac Asimov