Re: regex help...again
| From: | elias | Date: | Fri, 30 Mar 2001 22:07:02 +0000 |
| Subject: | Re: regex help...again | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-46299@lists.php.net to get a copy of this message | ||
So as you seem to be good with regexps, can you tell me how i can write a
code that will search for next occurence in a string?
where pattern is a regexp and a string is long and ofcourse there will be
lots of pattern matchs in it...?
thanks
"Christian Reiniger" <creinig@mayn.de> wrote in message
news:01033011550005.07394@chrisbig...
On Friday 30 March 2001 06:47, you wrote:
> Ok, i have a text file with lines that looks like this:
>
> 14``
value`value2````value3
>
> This would be fine, except...there are sometimes more ```` than in
> other columns, so id like it to be
>
> 14`valuevalue2`value3
$new = preg_replace ('/+/', '`', $old);
quite simple, eh?
--
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)
"World domination. Fast." (Linus Torvalds about Linux)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net