Re: [PHP] regex help needed

2004-08-01 Thread Wudi
On Sun, 1 Aug 2004 10:38:06 -0700 (PDT) Kathleen Ballard <[EMAIL PROTECTED]> wrote: > Sorry, > Here is the code I am using to match the tags: > > .* > > I have removed all the NL and CR chars from the string > I am matching to make things easier. Also, I have run > tidy on the code so the tags

Re: [PHP] Regex help needed

2003-07-16 Thread Curt Zirzow
Sid <[EMAIL PROTECTED]> wrote: > Hello, > > Well I am doing by first reg ex operations and I am having problems which I just > cannot figure out. > > For example I tried > echo eregi_replace ("(\s*)\s* size=\"2\">\s*purchasing power parity", '%POWER%', 'sdsdss bgcolor="#f8f8f1">Purchasing power

RE: [PHP] Regex help needed...

2001-02-13 Thread PHPBeginner.com
Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -Original Message- From: Jesse Swensen [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 13, 2001 4:39 AM To: PHPBeginner.com Subject: Re: [PHP] Regex help needed...

Re: [PHP] Regex help needed...

2001-02-12 Thread Jesse Swensen
on 2/12/01 4:30 PM, Christian Reiniger at [EMAIL PROTECTED] wrote: > On Monday 12 February 2001 21:08, Jesse Swensen wrote: This should be a quick one, but I can't seem to wrap my brain around it. All I need to do is replace leading or trailing spaces with underscores. If there is

Re: [PHP] Regex help needed...

2001-02-12 Thread Christian Reiniger
On Monday 12 February 2001 21:08, Jesse Swensen wrote: > >> This should be a quick one, but I can't seem to wrap my brain around > >> it. All I need to do is replace leading or trailing spaces with > >> underscores. If there is spaces in between words, leave them alone. > but I wanted to convert

Re: [PHP] Regex help needed...

2001-02-12 Thread Jason Stechschulte
> This is very close. If the string, " Testing ", had multiple spaces, but > I wanted to convert each space to a "_", then what? I tried: There may be a better way, but here is a lengthy one that works. $checkme = " this is it "; if(ereg("^( )+", $checkme

Re: [PHP] Regex help needed...

2001-02-12 Thread Jesse Swensen
on 2/12/01 1:01 PM, Jason Stechschulte at [EMAIL PROTECTED] wrote: > On Mon, Feb 12, 2001 at 12:15:04PM -0500, Jesse Swensen wrote: >> This should be a quick one, but I can't seem to wrap my brain around it. >> All I need to do is replace leading or trailing spaces with underscores. If >> there

RE: [PHP] Regex help needed...

2001-02-12 Thread PHPBeginner.com
rtrim() www.php.net/rtrim Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -Original Message- From: Jesse Swensen [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 13, 2001 2:15 AM To: [EMAIL PROTECT

Re: [PHP] Regex help needed...

2001-02-12 Thread Jason Stechschulte
On Mon, Feb 12, 2001 at 12:15:04PM -0500, Jesse Swensen wrote: > This should be a quick one, but I can't seem to wrap my brain around it. > All I need to do is replace leading or trailing spaces with underscores. If > there is spaces in between words, leave them alone. $fix = ereg_replace("(^ )|