[PHP] regex help needed

2004-08-01 Thread Kathleen Ballard
Sorry, Here is the code I am using to match the h* tags: h([1-9]){1}.*/h([1-9]){1} 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 are all uniform. The above string seems to match the tag well now, but I

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 h* tags: h([1-9]){1}.*/h([1-9]){1} 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

[PHP] Regex help needed

2003-07-16 Thread Sid
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 (tr bgcolor=\#F8F8F1\(\s*)td\s*font size=\2\\s*purchasing power parity, '%POWER%', 'tdtrsdsdsstr bgcolor=#f8f8f1tdfont size=2Purchasing power

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 (tr bgcolor=\#F8F8F1\(\s*)td\s*font size=\2\\s*purchasing power parity, '%POWER%', 'tdtrsdsdsstr

RE: [PHP] Regex help needed...

2001-02-13 Thread PHPBeginner.com
r 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... Thank you for your suggest, but I don't

[PHP] Regex help needed...

2001-02-12 Thread Jesse Swensen
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. Suggestions? -- Jesse Swensen [EMAIL PROTECTED] -- PHP General Mailing List

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("(^ )|(

RE: [PHP] Regex help needed...

2001-02-12 Thread PHPBeginner.com
PROTECTED] Subject: [PHP] Regex help needed... 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. Suggestions? -- Jesse Swensen [EMAIL PROTECTED

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 is

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 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 spaces in