[PHP] Regex help please

2009-03-27 Thread Shawn McKenzie
I'm normally OK with regex, especially if I fiddle with it long enough, however I have fiddled with this one so long that I'm either totally missing it or it's something simple. Does it have anything to do with the backref, or the fact that the value of the backref has a $? I have: $out = '

Re: [PHP] Regex help please

2009-03-27 Thread haliphax
On Fri, Mar 27, 2009 at 9:40 AM, Shawn McKenzie nos...@mckenzies.net wrote: I'm normally OK with regex, especially if I fiddle with it long enough, however I have fiddled with this one so long that I'm either totally missing it or it's something simple.  Does it have anything to do with the

Re: [PHP] Regex help please

2009-03-27 Thread Shawn McKenzie
haliphax wrote: On Fri, Mar 27, 2009 at 9:40 AM, Shawn McKenzie nos...@mckenzies.net wrote: I'm normally OK with regex, especially if I fiddle with it long enough, however I have fiddled with this one so long that I'm either totally missing it or it's something simple. Does it have anything

[PHP] Regex help

2008-09-09 Thread Jason Pruim
Hey everyone, Not completely specific to php but I know you guys know regex's better then I do! :) I am attempting to match purl.schreurprinting.com/jasonpruim112 to purl.schreurprinting.com/p.php?purl=jasonpruim112 Here are my current matching patterns: RewriteRule

RE: [PHP] Regex help

2008-09-09 Thread Boyd, Todd M.
-Original Message- From: Jason Pruim [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 09, 2008 7:30 AM To: PHP-General List Subject: [PHP] Regex help Hey everyone, Not completely specific to php but I know you guys know regex's better then I do! :) I am attempting to match

Re: [PHP] Regex Help for URL's [ANSWER]

2006-05-17 Thread Edward Vermillion
On May 16, 2006, at 7:53 PM, Chrome wrote: -Original Message- From: Robert Samuel White [mailto:[EMAIL PROTECTED] Sent: 17 May 2006 01:42 To: php-general@lists.php.net Subject: RE: [PHP] Regex Help for URL's [ANSWER] That's what I was doing. I was parsing A:HREF, IMG:SRC, etc

Re: [PHP] Regex Help for URL's

2006-05-17 Thread Kevin Waterson
This one time, at band camp, Robert Samuel White [EMAIL PROTECTED] wrote: Don't be rude. I've already don't all of that. Nothing came up. I've been programming for 20 years (since I was 11 years old) so I'm not a slacker when it comes to learning new things, however, I have always found

[PHP] Regex Help for URL's

2006-05-16 Thread Robert Samuel White
Can someone help me modify the following code? It was designed to search for all instances of [LEVEL#]...[/LEVEL#] I need a preg_match_all that will search for all of instances of an URL. It should be sophisticated enough to find something as complicated as this:

Re: [PHP] Regex Help for URL's

2006-05-16 Thread Jochem Maas
Robert Samuel White wrote: Can someone help me modify the following code? It was designed to search for all instances of [LEVEL#]...[/LEVEL#] I need a preg_match_all that will search for all of instances of an URL. It should be sophisticated enough to find something as complicated as this:

RE: [PHP] Regex Help for URL's

2006-05-16 Thread Robert Samuel White
: [PHP] Regex Help for URL's Robert Samuel White wrote: Can someone help me modify the following code? It was designed to search for all instances of [LEVEL#]...[/LEVEL#] I need a preg_match_all that will search for all of instances of an URL. It should be sophisticated enough to find

RE: [PHP] Regex Help for URL's

2006-05-16 Thread Robert Cummings
On Tue, 2006-05-16 at 16:31, Robert Samuel White wrote: Don't be rude. I've already don't all of that. Nothing came up. I've been programming for 20 years (since I was 11 years old) so I'm not a slacker when it comes to learning new things, however, I have always found regular expressions

Re: [PHP] Regex Help for URL's

2006-05-16 Thread John Nichel
it makes the email hard to read. Why is top posting bad? -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 16, 2006 4:28 PM To: Robert Samuel White Cc: php-general@lists.php.net Subject: Re: [PHP] Regex Help for URL's Robert Samuel White wrote: Can

RE: [PHP] Regex Help for URL's

2006-05-16 Thread Robert Samuel White
I am trying to get all of the urls in a web document, so that I can append information to the urls when needed (when the url points to a domain that resides on my server). It allows me to pass session information across the domains of my network. Currently, I use a class I wrote to handle this,

Re: [PHP] Regex Help for URL's

2006-05-16 Thread Jochem Maas
: Re: [PHP] Regex Help for URL's Robert Samuel White wrote: Can someone help me modify the following code? It was designed to search for all instances of [LEVEL#]...[/LEVEL#] I need a preg_match_all that will search for all of instances of an URL. It should be sophisticated enough to find

RE: [PHP] Regex Help for URL's

2006-05-16 Thread Chrome
-Original Message- From: Robert Samuel White [mailto:[EMAIL PROTECTED] Sent: 16 May 2006 21:32 To: php-general@lists.php.net Subject: RE: [PHP] Regex Help for URL's Don't be rude. I've already don't all of that. Nothing came up. I've been programming for 20 years (since I

RE: [PHP] Regex Help for URL's [ANSWER]

2006-05-16 Thread Robert Samuel White
In case any one is looking for a solution to a similar problem as me, here is the answer. I used the code from my original post as my guiding light, and with some experimentation, I figured it out. To get any URL, regardless of where it is located, use this: preg_match_all(#\'http://(.*)\'#U,

RE: [PHP] Regex Help for URL's [ANSWER]

2006-05-16 Thread Robert Cummings
On Tue, 2006-05-16 at 18:49, Robert Samuel White wrote: In case any one is looking for a solution to a similar problem as me, here is the answer. I used the code from my original post as my guiding light, and with some experimentation, I figured it out. To get any URL, regardless of where

RE: [PHP] Regex Help for URL's [ANSWER]

2006-05-16 Thread Richard Lynch
On Tue, May 16, 2006 6:21 pm, Robert Cummings wrote: On Tue, 2006-05-16 at 18:49, Robert Samuel White wrote: In case any one is looking for a solution to a similar problem as me, here preg_match_all(#(\|')http://(.*)(\|')#U, $content, $matches); And it's missing the original requirement of

RE: [PHP] Regex Help for URL's [ANSWER]

2006-05-16 Thread Robert Samuel White
All pages used by my content management system must be in a valid format. Old-school style pages are never created so the solution I have come up with is perfect for my needs. Thank you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Regex Help for URL's [ANSWER]

2006-05-16 Thread Chrome
-Original Message- From: Robert Samuel White [mailto:[EMAIL PROTECTED] Sent: 17 May 2006 01:16 To: php-general@lists.php.net Subject: RE: [PHP] Regex Help for URL's [ANSWER] All pages used by my content management system must be in a valid format. Old-school style pages

Re: [PHP] Regex Help for URL's

2006-05-16 Thread Richard Lynch
On Tue, May 16, 2006 4:22 pm, Jochem Maas wrote: personally I would assume anyone who had been programming for 20 yrs would have a reasonable understanding of regexps. Nope. :-) I got WAY past 20 year mark before I even began to pretend to understand the minimal amount of regex I can do now.

RE: [PHP] Regex Help for URL's [ANSWER]

2006-05-16 Thread Robert Samuel White
, then they'll code their pages to make use of this limitation. -Original Message- From: Chrome [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 16, 2006 8:24 PM To: 'Robert Samuel White'; php-general@lists.php.net Subject: RE: [PHP] Regex Help for URL's [ANSWER] -Original Message

RE: [PHP] Regex Help for URL's [ANSWER]

2006-05-16 Thread Chrome
-Original Message- From: Robert Samuel White [mailto:[EMAIL PROTECTED] Sent: 17 May 2006 01:28 To: php-general@lists.php.net Subject: RE: [PHP] Regex Help for URL's [ANSWER] In my opinion, it is the most reasonable solution. I have looked all over the web for something else

RE: [PHP] Regex Help for URL's [ANSWER]

2006-05-16 Thread Robert Samuel White
If we are talking clickable links, why not focus on the a construct itself? Otherwise URLs are just part of the page's textual content... Very difficult to parse that Disseminating an a tag isn't brain-meltingly difficult with a regex if you put your mind to it... With or without quotes, be

RE: [PHP] Regex Help for URL's [ANSWER]

2006-05-16 Thread Chrome
-Original Message- From: Robert Samuel White [mailto:[EMAIL PROTECTED] Sent: 17 May 2006 01:42 To: php-general@lists.php.net Subject: RE: [PHP] Regex Help for URL's [ANSWER] If we are talking clickable links, why not focus on the a construct itself? Otherwise URLs are just

Re: [PHP] Regex help

2006-01-14 Thread Curt Zirzow
On Fri, Jan 13, 2006 at 08:25:57AM -0500, Mike Smith wrote: I'm trying to save myself some time by extracting certain variables from a string: 102-90 E 42 X 42 X 70 3/8 I've been testing with: http://www.quanetic.com/regex.php and have been somewhat successful. Using this pattern:

[PHP] Regex help

2006-01-13 Thread Mike Smith
I'm trying to save myself some time by extracting certain variables from a string: 102-90 E 42 X 42 X 70 3/8 I've been testing with: http://www.quanetic.com/regex.php and have been somewhat successful. Using this pattern: /[0-9]{2,}( X| x|x )/ I have: 102-90 E [!MATCH!] [!MATCH!] 70 3/8

RE: [PHP] Regex help

2006-01-13 Thread Albert
Mike Smith wrote: I'm trying to save myself some time by extracting certain variables from a string: 102-90 E 42 X 42 X 70 3/8 If this string is always in this format xxx E panel X width X height then you could try something like: // Very much untested $unit = '102-90 E 42 X 42 X 70 3/8';

Re: [PHP] Regex help

2006-01-13 Thread Eric Martel
This should do the trick: /(\d+) ?X ?(\d+) ?X ?(\d+ [\d\/]+)/i (at least it would in Perl) Le 13 Janvier 2006 08:25, Mike Smith a écrit : I'm trying to save myself some time by extracting certain variables from a string: 102-90 E 42 X 42 X 70 3/8 I've been testing with:

Re: [PHP] Regex help

2006-01-13 Thread Mike Smith
Eric, thanks for replying. I couldn't quite get that to work. Albert, I'm currently working with what you suggested, though the unit names are not that consistent: $vals = preg_split(' ?X? ',$unit[1]); echo strong.$unit[1]./strongbr /\n; echo Panel: .$vals[0].br /Width: .$vals[1].br /Height:

[PHP] Regex help

2005-11-18 Thread Chris Boget
Why isn't this regular expression ^[A-Za-z0-9\.]+\s*[A-Za-z0-9\.]*$ allowing for this value: 'Co. Dublin' (w/o the single quotes) ? It's failing the regular expression match... thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Regex help

2005-11-18 Thread Robert Cummings
On Fri, 2005-11-18 at 10:55, Chris Boget wrote: Why isn't this regular expression ^[A-Za-z0-9\.]+\s*[A-Za-z0-9\.]*$ allowing for this value: 'Co. Dublin' (w/o the single quotes) ? It's failing the regular expression match... Do you have that expression embedded in single or double

Re: [PHP] Regex help

2005-11-18 Thread David Grant
Chris, if (preg_match(/^[A-Za-z0-9\.]+\s*[A-Za-z0-9\.]*$/, Co. Dublin)) echo TRUE; else echo FALSE; prints TRUE for me. Cheers, David Grant Chris Boget wrote: Why isn't this regular expression ^[A-Za-z0-9\.]+\s*[A-Za-z0-9\.]*$ allowing for this value: 'Co. Dublin' (w/o the

[PHP] Regex Help

2005-09-28 Thread Pablo Gosse
Hi, folks. I'm having trouble with a simple regex. I'm sure it's just something small that I'm missing but nothing I'm trying is working. In an HTML file I have comments like this: !-- START PRINT -- various html crap here !-- END PRINT -- Here's the regex I'm using: /!-- START PRINT

Re: [PHP] Regex Help

2005-09-28 Thread Philip Hallstrom
Hi, folks. I'm having trouble with a simple regex. I'm sure it's just something small that I'm missing but nothing I'm trying is working. In an HTML file I have comments like this: !-- START PRINT -- various html crap here !-- END PRINT -- Here's the regex I'm using: /!-- START PRINT

RE: [PHP] Regex Help

2005-09-28 Thread Murray @ PlanetThoughtful
Hi, folks. I'm having trouble with a simple regex. I'm sure it's just something small that I'm missing but nothing I'm trying is working. In an HTML file I have comments like this: !-- START PRINT -- various html crap here !-- END PRINT -- Here's the regex I'm using: /!-- START

RE: [PHP] Regex Help

2005-09-28 Thread Pablo Gosse
Greetings folks. Thanks Murray and Philip for the quick responses. Adding the /s modifier worked perfectly. Cheers, Pablo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] REGEX Help Please

2005-09-19 Thread Shaun
Hi, I am trying to implement a regular expression so that I have a number between 0.00 and 1.00. the following works except I can go up to 1.99 $regexp = /^[0-1]{1}.[0-9]{2}/; Can anyone help here please? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] REGEX Help Please

2005-09-19 Thread John Nichel
Shaun wrote: Hi, I am trying to implement a regular expression so that I have a number between 0.00 and 1.00. the following works except I can go up to 1.99 $regexp = /^[0-1]{1}.[0-9]{2}/; Can anyone help here please? Thanks May have to go outside just a regex... if ( preg_match (

Re: [PHP] REGEX Help Please

2005-09-19 Thread Robert Cummings
On Mon, 2005-09-19 at 10:11, John Nichel wrote: Shaun wrote: Hi, I am trying to implement a regular expression so that I have a number between 0.00 and 1.00. the following works except I can go up to 1.99 $regexp = /^[0-1]{1}.[0-9]{2}/; Can anyone help here please? Thanks

Re: [PHP] REGEX Help Please

2005-09-19 Thread Stephen Leaf
On Monday 19 September 2005 09:03 am, Shaun wrote: Hi, I am trying to implement a regular expression so that I have a number between 0.00 and 1.00. the following works except I can go up to 1.99 $regexp = /^[0-1]{1}.[0-9]{2}/; Can anyone help here please? Thanks $regexp =

Re: [PHP] Regex help

2005-08-07 Thread Dotan Cohen
On 8/4/05, Lizet Pena de Sola [EMAIL PROTECTED] wrote: Ok, it's not the regexp for detecting email addresses what I need, that's widely published, thanks. I'm using ereg to match this regular expression: (On)[\s\w\d\W\S\D\n]*(wr[i|o]te[s]?:) That will match phrases like On 8/3/05, Carol

RE: [PHP] Regex help

2005-08-04 Thread Lizet Pena de Sola
: Marcus Bointon [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 03, 2005 8:57 AM To: PHP General Subject: Re: [PHP] Regex help On 2 Aug 2005, at 15:12, Robin Vickery wrote: I don't suppose this is the place for a rant about the futility of checking email addresses with a regexp? Though I

Re: [PHP] Regex help

2005-08-03 Thread Marcus Bointon
On 2 Aug 2005, at 15:12, Robin Vickery wrote: I don't suppose this is the place for a rant about the futility of checking email addresses with a regexp? Though I will agree with you to some extent, I've had quite a lot of success with this, which is pretty thorough:

[PHP] Regex help

2005-08-02 Thread Chris Boget
I'm trying to validate an email address and for the life of me I cannot figure out why the following regex is not working: script language=php $email = [EMAIL PROTECTED]; $regex =

Re: [PHP] Regex help

2005-08-02 Thread Robin Vickery
On 8/2/05, Chris Boget [EMAIL PROTECTED] wrote: I'm trying to validate an email address and for the life of me I cannot figure out why the following regex is not working: $email = [EMAIL PROTECTED]; $regex =

Re: [PHP] Regex help

2005-08-02 Thread Dotan Cohen
On 8/2/05, Robin Vickery [EMAIL PROTECTED] wrote: I don't suppose this is the place for a rant about the futility of checking email addresses with a regexp? -robin Let Richard Lynch tell him. He's good at regex's, and it's HIS email address that never makes it through! Dotan Cohen

[PHP] Regex help

2005-06-06 Thread RaTT
Hi Guys, I am currently creating a once off text parser for a rather large document that i need to strip out bits of information on certain lines. The line looks something like : Adress line here, postcode, country Tel: +27 112233665 Fax: 221145221 Website: http://www.urlhere.com E-Mail:

Re: [PHP] Regex help

2005-06-06 Thread Philip Hallstrom
I am currently creating a once off text parser for a rather large document that i need to strip out bits of information on certain lines. The line looks something like : Adress line here, postcode, country Tel: +27 112233665 Fax: 221145221 Website: http://www.urlhere.com E-Mail: [EMAIL

[PHP] RegEx help

2005-04-14 Thread Bosky, Dave
I wanted to create a regex that force a PHP form text field to meet the following requirements: a. Must contain an 1 uppercase letter. [A-Z] b. Must contain 1 digit. [0-9] c. Must be a minimum of 7 characters in length. {7} I'm not sure of how to build the correct syntax for using all 3

Re: [PHP] RegEx help

2005-04-14 Thread Philip Hallstrom
On Thu, 14 Apr 2005, Bosky, Dave wrote: I wanted to create a regex that force a PHP form text field to meet the following requirements: a. Must contain an 1 uppercase letter. [A-Z] b. Must contain 1 digit. [0-9] c. Must be a minimum of 7 characters in length. {7} if ( ereg([A-Z0-9], $field)

Re: [PHP] RegEx help

2005-04-14 Thread M. Sokolewicz
Philip Hallstrom wrote: On Thu, 14 Apr 2005, Bosky, Dave wrote: I wanted to create a regex that force a PHP form text field to meet the following requirements: a. Must contain an 1 uppercase letter. [A-Z] b. Must contain 1 digit. [0-9] c. Must be a minimum of 7 characters in length. {7} if (

Re: [PHP] RegEx help

2005-04-14 Thread Tom Rogers
Hi, Thursday, April 14, 2005, 11:47:13 PM, you wrote: BD I wanted to create a regex that force a PHP form text field to meet the BD following requirements: BD a. Must contain an 1 uppercase letter. [A-Z] BD b. Must contain 1 digit. [0-9] BD c. Must be a minimum of 7 characters in length. {7}

Re: [PHP] RegEx help

2005-04-14 Thread Philip Hallstrom
I wanted to create a regex that force a PHP form text field to meet the following requirements: a. Must contain an 1 uppercase letter. [A-Z] b. Must contain 1 digit. [0-9] c. Must be a minimum of 7 characters in length. {7} if ( ereg([A-Z0-9], $field) strlen($field) = 7 ) { print(We have a

Re: [PHP] RegEx help

2005-04-14 Thread trlists
On 15 Apr 2005 Tom Rogers wrote: BD a. Must contain an 1 uppercase letter. [A-Z] BD b. Must contain 1 digit. [0-9] BD c. Must be a minimum of 7 characters in length. {7} BD I'm not sure of how to build the correct syntax for using all 3 BD requirements together. easier done seperately I

RE: [PHP] Regex help

2005-01-29 Thread Michael Sims
[EMAIL PROTECTED] wrote: OK, this is off-topic like every other regex help post, but I know some of you enjoy these puzzles :) This isn't an exam question, is it? ;) I need a validation regex that will pass a string. The string can be no longer than some maximum length, and it can contain

RE: [PHP] Regex help

2005-01-29 Thread Bret Hughes
On Sat, 2005-01-29 at 08:58, Michael Sims wrote: [EMAIL PROTECTED] wrote: OK, this is off-topic like every other regex help post, but I know some of you enjoy these puzzles :) This isn't an exam question, is it? ;) I need a validation regex that will pass a string. The string can be

RE: [PHP] Regex help

2005-01-29 Thread Michael Sims
Bret Hughes wrote: On Sat, 2005-01-29 at 08:58, Michael Sims wrote: [EMAIL PROTECTED] wrote: I need a validation regex that will pass a string. The string can be no longer than some maximum length, and it can contain any characters except two consecutive ampersands () anywhere in the string.

Re: [PHP] Regex help

2005-01-29 Thread kjohnson
Michael Sims wrote: I need a validation regex that will pass a string. The string can be no longer than some maximum length, and it can contain any characters except two consecutive ampersands () anywhere in the string. Yup, use this perl regex: /^(?:()(?!)|[^]){1,5}$/ [snip] Hope

[PHP] Regex help

2005-01-28 Thread kjohnson
OK, this is off-topic like every other regex help post, but I know some of you enjoy these puzzles :) I need a validation regex that will pass a string. The string can be no longer than some maximum length, and it can contain any characters except two consecutive ampersands () anywhere in the

Re: [PHP] Regex help

2005-01-28 Thread trlists
On 28 Jan 2005 [EMAIL PROTECTED] wrote: I need a validation regex that will pass a string. The string can be no longer than some maximum length, and it can contain any characters except two consecutive ampersands () anywhere in the string. This is an example of something that is easier to

Re: [PHP] Regex help

2005-01-28 Thread kjohnson
[EMAIL PROTECTED] wrote on 01/28/2005 03:19:14 PM: On 28 Jan 2005 [EMAIL PROTECTED] wrote: I need a validation regex that will pass a string. The string can be no longer than some maximum length, and it can contain any characters except two consecutive ampersands () anywhere in the

Re: [PHP] Regex help

2005-01-28 Thread Richard Lynch
[EMAIL PROTECTED] wrote: OK, this is off-topic like every other regex help post, but I know some of you enjoy these puzzles :) I need a validation regex that will pass a string. The string can be no longer than some maximum length, and it can contain any characters except two consecutive

Re: [PHP] Regex help

2005-01-28 Thread Richard Lynch
[EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote on 01/28/2005 03:19:14 PM: On 28 Jan 2005 [EMAIL PROTECTED] wrote: I need a validation regex that will pass a string. The string can be no longer than some maximum length, and it can contain any characters except two consecutive

Re: [PHP] Regex help

2005-01-28 Thread trlists
On 28 Jan 2005 [EMAIL PROTECTED] wrote: Thanks, Tom. I agree, but not an option at this time - other parts of the design require this to be a regex. It is pretty easy to do with two regexps, one to check the length and another to see if there is a double . Would that work? I don't know

Re: [PHP] Regex help

2005-01-28 Thread kjohnson
[EMAIL PROTECTED] wrote on 01/28/2005 04:13:38 PM: On 28 Jan 2005 [EMAIL PROTECTED] wrote: Thanks, Tom. I agree, but not an option at this time - other parts of the design require this to be a regex. It is pretty easy to do with two regexps, one to check the length and another to

Re: [PHP] regex help

2005-01-15 Thread Jason Morehouse
Mike Ford wrote: Just off the top of my head (and untested!), I'd try something like /b(\s+[^]*)?/ Cheers! Mike That pretty much seems to work the best. Thanks all! -- Jason Morehouse Vendorama - Create your own online store http://www.vendorama.com -- PHP General Mailing List

Re: [PHP] regex help

2005-01-14 Thread Robin Vickery
On Thu, 13 Jan 2005 16:06:32 -0500, Jason Morehouse [EMAIL PROTECTED] wrote: Hello, I normally can take a bit of regex fun, but not this time. Simple enough, in theory... I need to match (count) all of the bold tags in a string, including ones with embedded styles (or whatever else can go

RE: [PHP] regex help

2005-01-14 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm -Original Message- From: Jason Morehouse Sent: 13/01/05 21:06 I normally can take a bit of regex fun, but not this time. Simple enough, in theory... I need to match

RE: [PHP] regex help

2005-01-14 Thread Robinson, Matthew
Do you have the example regex so far? I'd suggest maybe b[^r] might just do what you want -Original Message- From: Jason Morehouse [mailto:[EMAIL PROTECTED] Sent: 13 January 2005 21:07 To: php-general@lists.php.net Subject: [PHP] regex help Hello, I normally can take a bit of regex

Re: [PHP] regex help

2005-01-14 Thread Jason Wong
On Friday 14 January 2005 05:06, Jason Morehouse wrote: Simple enough, in theory... I need to match (count) all of the bold tags in a string, including ones with embedded styles (or whatever else can go in there). b and b style=color:red. My attempts keep matching br as well.

Re: [PHP] regex help

2005-01-14 Thread Richard Lynch
Jason Morehouse wrote: Simple enough, in theory... I need to match (count) all of the bold tags in a string, including ones with embedded styles (or whatever else can go in there). b and b style=color:red. My attempts keep matching br as well. I think something not unlike: '/b( .*|)/' The

Re: [PHP] regex help

2005-01-14 Thread Bret Hughes
On Thu, 2005-01-13 at 15:06, Jason Morehouse wrote: Hello, I normally can take a bit of regex fun, but not this time. Simple enough, in theory... I need to match (count) all of the bold tags in a string, including ones with embedded styles (or whatever else can go in there). b and b

[PHP] regex help

2005-01-13 Thread Jason Morehouse
Hello, I normally can take a bit of regex fun, but not this time. Simple enough, in theory... I need to match (count) all of the bold tags in a string, including ones with embedded styles (or whatever else can go in there). b and b style=color:red. My attempts keep matching br as well.

Re: [PHP] regex help

2005-01-13 Thread Jochem Maas
Jason Morehouse wrote: Hello, I normally can take a bit of regex fun, but not this time. Simple enough, in theory... I need to match (count) all of the bold tags in a string, including ones with embedded styles (or whatever else can go in there). b and b style=color:red. My attempts keep

[PHP] Regex help...

2004-10-16 Thread Murray @ PlanetThoughtful
Hi All, I rather badly need some help with a regular expression. I need to identify the occurrence of the following search string in another string, and replace it with some text followed by the identified search string. search string pa

[PHP] regex help and file question

2004-08-07 Thread PHP Gen
Hi, I am just starting out with regex (and classes) so am not sure how to do this... I am seeing if a HTML file exists, if yes, I am using file_get_contents to get the entire HTML file into a string. In the HTML file I already have this: !-- Start header -- html body whatever you want comes

[PHP] regex help

2004-08-01 Thread Kathleen Ballard
I am at the tailend of a project that involves moving legacy data from one dbms to another. The client has added a new requirement to the data manipulation that is required. I need to remove all br / tags (there may be more that one) that appear within all h* tags. I am not very familiar with

Re: [PHP] regex help

2004-08-01 Thread Jim Grill
Can you post a little sample of the data and your current code? thanks. Jim Grill Web-1 Hosting http://www.web-1hosting.net - Original Message - From: Kathleen Ballard [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, August 01, 2004 8:27 AM Subject: [PHP] regex help I am

[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

2004-08-01 Thread Justin Patrin
On Sun, 1 Aug 2004 06:27:51 -0700 (PDT), Kathleen Ballard [EMAIL PROTECTED] wrote: I am at the tailend of a project that involves moving legacy data from one dbms to another. The client has added a new requirement to the data manipulation that is required. I need to remove all br / tags

Re: [PHP] regex help

2004-08-01 Thread Justin Patrin
Forget my first attempt, using the e modifier and another preg_replace is much better. $return = preg_replace('!h(\d)(.*?)/h\1!ie', 'preg_replace(!br[^]*!i, , $1)', $originalText); On Sun, 1 Aug 2004 13:39:49 -0700, Justin Patrin [EMAIL PROTECTED] wrote: On Sun, 1 Aug 2004 06:27:51 -0700 (PDT),

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

2004-05-10 Thread hitek
Greetings list, I have been given a list of products, and I need some help building a regular expression to split the category from the sub category. Example: CamerasDigital_CannonXLRshot -Original entry in list Cameras Digital Cannon XLRshot -Desired result. I can use str_replace() for the

Re: [PHP] Regex Help

2004-05-10 Thread Curt Zirzow
* Thus wrote hitek ([EMAIL PROTECTED]): Greetings list, I have been given a list of products, and I need some help building a regular expression to split the category from the sub category. Example: CamerasDigital_CannonXLRshot -Original entry in list Cameras Digital Cannon XLRshot

Re: [PHP] Regex Help

2004-05-10 Thread hitek
Curt, That's perfect. Works like a charm. Thanks, Keith At 03:54 PM 5/10/2004, Curt Zirzow wrote: * Thus wrote hitek ([EMAIL PROTECTED]): Greetings list, I have been given a list of products, and I need some help building a regular expression to split the category from the sub category.

Re: [PHP] Regex help - PLease

2004-03-17 Thread Michal Migurski
Sorry I to should have added this this is what im going with so far preg_match(/\d100.*/); This will match a digit, followed by '100', followed by anything. Go with Rob's suggestion. - michal migurski- contact info and pgp key:

[PHP] Regex help - PLease

2004-03-16 Thread Brent Clark
Hi there im in desperate need of help for a reg expression to ONLY allow 8 NUMBERS to start with 100 and may not have any other kind of letters or characters. Only numbers for example 10064893 Kind Regards And thank you Brent Clark

[PHP] Regex help - PLease

2004-03-16 Thread Brent Clark
Sorry I to should have added this this is what im going with so far preg_match(/\d100.*/); Kind Regards Brent Clark

Re: [PHP] Regex help - PLease

2004-03-16 Thread Richard Davey
Hello Brent, Tuesday, March 16, 2004, 12:39:27 PM, you wrote: BC im in desperate need of help for a reg expression to ONLY allow 8 BC NUMBERS to start with 100 and may not have any other kind of BC letters or characters. Only numbers BC for example BC 10064893 It's not a reg exp, but it will

Re: [PHP] Regex help - PLease

2004-03-16 Thread Rob Ellis
On Tue, Mar 16, 2004 at 02:39:27PM +0200, Brent Clark wrote: Hi there im in desperate need of help for a reg expression to ONLY allow 8 NUMBERS to start with 100 and may not have any other kind of letters or characters. Only numbers for example 10064893 if

Re: [PHP] Regex help - PLease

2004-03-16 Thread Pablo
On 03/16/2004 6:57 AM, Rob Ellis [EMAIL PROTECTED] wrote: On Tue, Mar 16, 2004 at 02:39:27PM +0200, Brent Clark wrote: Hi there im in desperate need of help for a reg expression to ONLY allow 8 NUMBERS to start with 100 and may not have any other kind of letters or characters. Only

[PHP] Regex help

2004-03-15 Thread Ryan A
Hi, I know this is pretty easy to do but I am horrorable at working with regular expressions and was wondering if anybody might take a min to help please. I will have a variable: $the_extention which will have a value like:98797-234234--2c-something-2c How do I take out the part which will

RE: [PHP] Regex help

2004-03-15 Thread Chris W. Parker
Ryan A mailto:[EMAIL PROTECTED] on Monday, March 15, 2004 9:07 AM said: I know this is pretty easy to do but I am horrorable at working with regular expressions and was wondering if anybody might take a min to help please. in that case you should get the regex coach (easy to find via

Re: [PHP] Regex help

2004-03-15 Thread Jason Wong
On Tuesday 16 March 2004 01:06, Ryan A wrote: I know this is pretty easy to do but I am horrorable at working with regular expressions and was wondering if anybody might take a min to help please. I will have a variable: $the_extention which will have a value like:

Re: [PHP] Regex help

2004-03-15 Thread Michal Migurski
I will have a variable: $the_extention which will have a value like: 98797-234234--2c-something-2c How do I take out the part which will always start with --2c and will always end with -2c You could use preg_replaces, like so: $result = preg_replace('/--2c.+-c/', '', $the_extention);

Re: [PHP] Regex help

2004-03-15 Thread Eric Gorr
At 6:06 PM +0100 3/15/04, Ryan A wrote: I know this is pretty easy to do but I am horrorable at working with regular expressions and was wondering if anybody might take a min to help please. I will have a variable: $the_extention which will have a value like:98797-234234--2c-something-2c How

RE: [PHP] Regex help

2004-03-15 Thread Ryan A
Hey, Thanks guys. I did search on google first for a tutorial, problem is with something as widely used as regular expressions there are LOTS of results...I felt it would be better to ask if anyone has a favourite.. ie: if you learnt it off the web and not via the manual. The last time I had

Re: [PHP] Regex help

2004-03-15 Thread trlists
On 15 Mar 2004 Eric Gorr wrote: which will have a value like:98797-234234--2c-something-2c How do I take out the part which will always start with --2c and will always end with -2c I'd be interested in the answer to this question as well. Seems like it should be easy. It is easy.

Re: [PHP] Regex help (SOLVED)

2004-03-15 Thread Ryan A
Hey Guys, Solved this, took your advise and avoided regex as its an overkill. Case you're interested: $th_var=98797-234234--2c-something-2c; $piece = explode(--2, $th_var); echo $piece[0]; (and if i want to use the second part... $piece[1] ) Thanks to everyone who gave me examples, links and

  1   2   >