Re: [PHP] Regex help please

2009-03-27 Thread Shawn McKenzie
haliphax wrote: > On Fri, Mar 27, 2009 at 9:40 AM, Shawn McKenzie 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 >> t

Re: [PHP] Regex help please

2009-03-27 Thread haliphax
On Fri, Mar 27, 2009 at 9:40 AM, Shawn McKenzie 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 backref, or the fac

[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 = ' {$si

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

[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 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 fou

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,

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 cons

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 construct > itself? Otherwise URLs are just part of the page's textual content... Very > difficult to parse that > Disseminating an tag isn't brain-meltingly difficult with a regex if > you put your mind to it... With or without quotes,

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 ov

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

2006-05-16 Thread Robert Samuel White
in a page, 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 [ANS

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 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 for

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 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 requirem

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 whe

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

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

Re: [PHP] Regex Help for URL's

2006-05-16 Thread Jochem Maas
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 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 w

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, b

Re: [PHP] Regex Help for URL's

2006-05-16 Thread John Nichel
us to do it for. Simple enough, don't you think. Because 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

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 > expression

RE: [PHP] Regex Help for URL's

2006-05-16 Thread Robert Samuel White
ite Cc: php-general@lists.php.net Subject: 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

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: ht

[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: http(s)://x.y.z.domain.com/dir/

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: >

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 "".$unit[1]."\n"; echo "Panel: ".$vals[0]."Width: ".$vals[1]."Height: ".$vals[2]."\n"; 202

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: http://www.q

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 E X X then you could try something like: // Very much untested $unit = '102-90 E 42 X 42 X 70 3/8'; $split1 = explo

[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 Ideall

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. Du

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

[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-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

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: > > > various html crap here > > > Here's the regex I'm using: > > /(.*?)/ > > And then the call to

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: various html crap here Here's the regex I'm using: /(.*?)/ And then the call to preg_match_all(): preg_mat

[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: various html crap here Here's the regex I'm using: /(.*?)/ And then the call to preg_match_all(): preg_matc

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 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 p

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 ( "/

[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: http

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/

RE: [PHP] Regex help

2005-08-03 Thread Lizet Pena de Sola
a, Lizet -Original Message- From: 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 > ch

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: ^(?:[\w\!\#\$\%\&\'\*\+

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 ht

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 = > "^([a-zA-Z0-9_\.\-\']+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-

[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: $email = "[EMAIL PROTECTED]"; $regex = "^([a-zA-Z0-9_\.\-\']+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-\']+\.)+))([a-zA-Z]{2,4}|[0-9]{

Re: [PHP] Regex help

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 PROTECT

[PHP] Regex help

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: [EMA

Re: [PHP] RegEx help

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 se

Re: [PHP] RegEx help

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

Re: [PHP] RegEx help

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. {

Re: [PHP] RegEx help

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 ( ereg("

Re: [PHP] RegEx help

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) && st

[PHP] RegEx help

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 requ

Re: [PHP] Regex help

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}$/

RE: [PHP] Regex help

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 i

RE: [PHP] Regex help

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 str

RE: [PHP] Regex help

[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 con

Re: [PHP] Regex help

[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 > anoth

Re: [PHP] Regex help

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

[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 co

Re: [PHP] Regex help

[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 consec

Re: [PHP] Regex help

[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 (&) anywher

Re: [PHP] Regex help

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

[PHP] Regex help

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

Re: [PHP] regex help

Mike Ford wrote: Just off the top of my head (and untested!), I'd try something like /]*)?>/ 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 (http://www.php.net/) To

Re: [PHP] regex help

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). and

Re: [PHP] regex help

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). and . My attempts keep matching > as well. I think something not unlike: '/|>)/' The point being that you

Re: [PHP] regex help

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). and . My attempts keep matching > as well. Quick-n-dirty: preg_match_a

RE: [PHP] regex help

Do you have the example regex so far? I'd suggest maybe 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 fun, but not this time. Simple enough, in theory... I need to match (count) all o

RE: [PHP] regex help

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

Re: [PHP] regex help

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

Re: [PHP] regex help

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). and . My attempts keep matching as well. okay

[PHP] regex help

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). and . My attempts keep matching as well. Thanks! -- Jason Morehouse

[PHP] Regex help...

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. http://mysite/index.php?p=2#more-2";>(more…) The con

[PHP] regex help and file question

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: whatever you want comes here How do I use a regex to

Re: [PHP] regex help needed

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

Forget my first attempt, using the e modifier and another preg_replace is much better. $return = preg_replace('!(.*?)!ie', 'preg_replace("!]*>!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), Kat

Re: [PHP] regex help

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 tags (the

[PHP] regex help needed

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 are all uniform. The above string seems to match the tag well now, but I still need to remove the b

Re: [PHP] regex help

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: [PH

[PHP] regex help

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 tags (there may be more that one) that appear within all tags. I am not very familiar with buildin

Re: [PHP] Regex Help

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. > E

Re: [PHP] Regex Help

* 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

[PHP] Regex Help

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 un

Re: [PHP] Regex help - PLease

>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 ke

Re: [PHP] Regex help - PLease

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.

Re: [PHP] Regex help - PLease

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 (preg_match('/^1

Re: [PHP] Regex help - PLease

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 w

[PHP] Regex help - PLease

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

[PHP] Regex help - PLease

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

Re: [PHP] Regex help (SOLVED)

>Thanks to everyone who gave me examples, links and suggested alternatives >like explode(), but personally I thought explode too was a regex..:-(. explode() is not, split() is. - michal migurski- contact info and pgp key: sf/ca

Re: [PHP] Regex help (SOLVED)

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

Re: [PHP] Regex help

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.

RE: [PHP] Regex help

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 this

Re: [PHP] Regex help

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

>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_extent

Re: [PHP] Regex help

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:98797-234234--2

RE: [PHP] Regex help

Ryan A 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

  1   2   >