Re: [PHP] Regex for Validating URL

2004-09-03 Thread Jason Wong
On Friday 03 September 2004 02:23, Nick Wilson wrote: * and then Jason Wong declared - now re-read what I said. I rest my case. Classic. Thankyou Jason, you're a star. I really didnt apreciate just how inept at interaction with peers you truly were. Beautiful, very kind of you to share

Re: [PHP] Regex for Validating URL

2004-09-03 Thread raditha dissanayake
PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Regex for Validating URL Justin Palmer wrote: I agree Nick for an open source community this list is not very open. Quite a few I am better than you type people on the list. This is not an open source list. this is a php list. -- Raditha

Re: [PHP] Regex for Validating URL

2004-09-03 Thread Nick Wilson
* and then raditha dissanayake declared Just shows your IQ levels. Just because PHP is open source does not make this an open source. I think he was talking about the 'spirit' of open source, not the mechanics and legalities of the list. I know i was, so dont assume please... -- Nick W

RE: [PHP] Regex for Validating URL

2004-09-03 Thread Ford, Mike
On 02 September 2004 19:41, Nick Wilson wrote: You know guys? I think you all take this a bit too seriously, perdanticness (is there such a word?) Just to be pedantic, that would be pedantry ;) ! Cheers! Mike - Mike Ford,

RE: [PHP] Regex for Validating URL

2004-09-03 Thread Alex Hogan
Just to be pedantic, that would be pedantry ;) ! Is this thread ever going to die? Or would that be dye? ;) alex hogan * The contents of this e-mail and any files transmitted with it are confidential and

[PHP] Regex for Validating URL

2004-09-02 Thread Nick Wilson
Hi all, yeah, i know, i did do quite a bit of searching but I just cant find it... Does anyone have the regex to make sure an http address is full and without error? like http://www.example.com Much thanks ;-) -- Nick W -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Regex for Validating URL

2004-09-02 Thread Stut
On Thu, 2 Sep 2004 10:59:20 +0200, Nick Wilson [EMAIL PROTECTED] wrote: yeah, i know, i did do quite a bit of searching but I just cant find it... Does anyone have the regex to make sure an http address is full and without error? like http://www.example.com A quick google (php regex

Re: [PHP] Regex for Validating URL

2004-09-02 Thread Nick Wilson
* and then Stut declared Does anyone have the regex to make sure an http address is full and without error? like http://www.example.com A quick google (php regex validate url) found this... http://www.canowhoopass.com/guides/regex/ Yes, i saw that page. As I said, I have searched

Re: [PHP] Regex for Validating URL

2004-09-02 Thread Jason Wong
don't think anybody can sensibly help you. For instance for the above example you don't even need a regex: if ($url === 'http://www.example.com') { echo 'Yay!, full and without error!'; } I've a feeling that's not what you want, so tell us what you want. A quick google (php regex validate

Re: [PHP] Regex for Validating URL

2004-09-02 Thread John Holmes
From: Nick Wilson [EMAIL PROTECTED] Does anyone have the regex to make sure an http address is full and without error? like http://www.example.com (?:http://(?:(?:(?:(?:(?:[a-zA-Z\d](?:(?:[a-zA-Z\d]|-)*[a-zA-Z\d])?)\. )*(?:[a-zA-Z](?:(?:[a-zA-Z\d]|-)*[a-zA-Z\d])?))|(?:(?:\d+)(?:\.(?:\d+)

Re: [PHP] Regex for Validating URL

2004-09-02 Thread John Nichel
John Holmes wrote: From: Nick Wilson [EMAIL PROTECTED] Does anyone have the regex to make sure an http address is full and without error? like http://www.example.com (?:http://(?:(?:(?:(?:(?:[a-zA-Z\d](?:(?:[a-zA-Z\d]|-)*[a-zA-Z\d])?)\.

Re: [PHP] Regex for Validating URL

2004-09-02 Thread Jason Wong
On Thursday 02 September 2004 20:52, John Holmes wrote: From: Nick Wilson [EMAIL PROTECTED] Does anyone have the regex to make sure an http address is full and without error? like http://www.example.com (?:http://(?:(?:(?:(?:(?:[a-zA-Z\d](?:(?:[a-zA-Z\d]|-)*[a-zA-Z\d])?)\.

Re: [PHP] Regex for Validating URL

2004-09-02 Thread Nick Wilson
* and then Jason Wong declared It would be nice when asking a question to summarise what research you have done. Instead of just saying I've looked and found nothing (or words to that effect). bugger off jason, if you dont understand the question dont bore me with your silliness. --

Re: [PHP] Regex for Validating URL

2004-09-02 Thread Nick Wilson
* and then John Holmes declared From: Nick Wilson [EMAIL PROTECTED] Does anyone have the regex to make sure an http address is full and without error? like http://www.example.com (?:http://(?:(?:(?:(?:(?:[a-zA-Z\d](?:(?:[a-zA-Z\d]|-)*[a-zA-Z\d])?)\. Pretty funny John. apart from

Re: [PHP] Regex for Validating URL

2004-09-02 Thread Jason Wong
On Thursday 02 September 2004 21:08, John Nichel wrote: What about NFS mounts? ;) What about them? Look carefully. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development *

Re: [PHP] Regex for Validating URL

2004-09-02 Thread Nick Wilson
* and then John Nichel declared John Holmes wrote: From: Nick Wilson [EMAIL PROTECTED] Does anyone have the regex to make sure an http address is full and without error? like http://www.example.com (?:http://(?:(?:(?:(?:(?:[a-zA-Z\d](?:(?:[a-zA-Z\d]|-)*[a-zA-Z\d])?)\.

RE: [PHP] Regex for Validating URL

2004-09-02 Thread Jay Blanchard
[snip] * and then Jason Wong declared It would be nice when asking a question to summarise what research you have done. Instead of just saying I've looked and found nothing (or words to that effect). bugger off jason, if you dont understand the question dont bore me with your silliness.

Re: [PHP] Regex for Validating URL

2004-09-02 Thread John Holmes
From: Jason Wong [EMAIL PROTECTED] Does anyone have the regex to make sure an http address is full and without error? like http://www.example.com (?:http://(?:(?:(?:(?:(?:[a-zA-Z\d](?:(?:[a-zA-Z\d]|-)*[a-zA-Z\d])?)\. )*(?:[a-zA-Z](?:(?:[a-zA-Z\d]|-)*[a-zA-Z\d])?))|(?:(?:\d+)(?:\.(?:\d+) [snip]

Re: [PHP] Regex for Validating URL

2004-09-02 Thread John Holmes
From: Nick Wilson [EMAIL PROTECTED] * and then Jason Wong declared It would be nice when asking a question to summarise what research you have done. Instead of just saying I've looked and found nothing (or words to that effect). bugger off jason, if you dont understand the question dont bore

Re: [PHP] Regex for Validating URL

2004-09-02 Thread Nick Wilson
* and then Jay Blanchard declared Easy gentlemen...easy Fair play Jay. This is not my first encounter with mr.social.skills though ;-) -- Nick W -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Regex for Validating URL

2004-09-02 Thread Nick Wilson
* and then John Holmes declared Seriously, I hope you were being sarcastic or something, Nick. Otherwise the smart people on the list know how to use filters to tune out idiots. I think it's a clear question. I dread coming to this list in case Jason decides to 'tell me off' for somthing.

Re: [PHP] Regex for Validating URL

2004-09-02 Thread Nick Wilson
* and then John Holmes declared From: Nick Wilson [EMAIL PROTECTED] * and then Jason Wong declared besides, i will not be treated that way by anyone without saying somthing. IMO some on this list need to get out a bit more, meet some people, aquire some manners and social skills. I

Re: [PHP] Regex for Validating URL

2004-09-02 Thread John Nichel
Nick Wilson wrote: * and then Jason Wong declared It would be nice when asking a question to summarise what research you have done. Instead of just saying I've looked and found nothing (or words to that effect). bugger off jason, if you dont understand the question dont bore me with your

Re: [PHP] Regex for Validating URL

2004-09-02 Thread John Nichel
Jason Wong wrote: On Thursday 02 September 2004 21:08, John Nichel wrote: What about NFS mounts? ;) What about them? Look carefully. I don't know if I have that much time. :) -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Regex for Validating URL

2004-09-02 Thread Justin French
On 02/09/2004, at 11:27 PM, Nick Wilson wrote: * and then Jason Wong declared It would be nice when asking a question to summarise what research you have done. Instead of just saying I've looked and found nothing (or words to that effect). bugger off jason, if you dont understand the

Re: [PHP] Regex for Validating URL

2004-09-02 Thread John Nichel
Jay Blanchard wrote: Easy gentlemen...easy Who you callin' a gentleman?!?! -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Regex for Validating URL

2004-09-02 Thread Nick Wilson
* and then Justin French declared On 02/09/2004, at 11:27 PM, Nick Wilson wrote: * and then Jason Wong declared It would be nice when asking a question to summarise what research you have done. Instead of just saying I've looked and found nothing (or words to that effect).

Re: [PHP] Regex for Validating URL

2004-09-02 Thread Octavian Rasnita
PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, September 02, 2004 4:56 PM Subject: Re: [PHP] Regex for Validating URL From: Jason Wong [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Regex for Validating URL

2004-09-02 Thread Jason Wong
On Thursday 02 September 2004 22:10, Nick Wilson wrote: * and then John Holmes declared Seriously, I hope you were being sarcastic or something, Nick. Otherwise the smart people on the list know how to use filters to tune out idiots. I think it's a clear question. I dread coming to

RE: [PHP] Regex for Validating URL

2004-09-02 Thread Justin Palmer
answers without the bull shit that you get here. Regards, Justin -Original Message- From: Nick Wilson [mailto:[EMAIL PROTECTED] Sent: Thursday, September 02, 2004 7:15 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Regex for Validating URL * and then John Holmes declared From: Nick

RE: [PHP] Regex for Validating URL

2004-09-02 Thread Justin Palmer
PROTECTED] Sent: Thursday, September 02, 2004 7:16 AM To: Nick Wilson Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Regex for Validating URL On 02/09/2004, at 11:27 PM, Nick Wilson wrote: * and then Jason Wong declared It would be nice when asking a question to summarise what research you have

Re: [PHP] Regex for Validating URL

2004-09-02 Thread Curt Zirzow
* Thus wrote Nick Wilson: * and then John Holmes declared From: Nick Wilson [EMAIL PROTECTED] Does anyone have the regex to make sure an http address is full and without error? like http://www.example.com (?:http://(?:(?:(?:(?:(?:[a-zA-Z\d](?:(?:[a-zA-Z\d]|-)*[a-zA-Z\d])?)\.

Re: [PHP] Regex for Validating URL

2004-09-02 Thread Jason Wong
On Thursday 02 September 2004 22:15, Justin French wrote: No, Jason was right (in his usual, abrupt, rude kinda way). abrupt -- maybe, rude -- no I usually reserve my more elegant prose for my sweetheart. Good questions get good answers. Good advice. -- Jason Wong - Gremlins Associates -

Re: [PHP] Regex for Validating URL

2004-09-02 Thread Manuel Lemos
Hello, From: Nick Wilson [EMAIL PROTECTED] Does anyone have the regex to make sure an http address is full and without error? like http://www.example.com Usually I use this expression: '^(http|https)\://(([-!#\$%\'*+.0-9=?A-Z^_`a-z{|}~^?]+\.)+[A-Za-z]{2,6})(\:[0-9]+)?(/)?/' You may also want to

Re: [PHP] Regex for Validating URL

2004-09-02 Thread raditha dissanayake
Justin Palmer wrote: I agree Nick for an open source community this list is not very open. Quite a few I am better than you type people on the list. This is not an open source list. this is a php list. -- Raditha Dissanayake.

Re: [PHP] Regex for Validating URL

2004-09-02 Thread John Nichel
Justin Palmer wrote: I agree Nick for an open source community this list is not very open. Quite a few I am better than you type people on the list. This list is tame Justin. How does that make the beginner feel? I better not ask a question, for I fear that I will get flamed. What a joke! How

RE: [PHP] Regex for Validating URL OT

2004-09-02 Thread Jay Blanchard
[snip] I agree Nick for an open source community this list is not very open. Quite a few I am better than you type people on the list. How does that make the beginner feel? I better not ask a question, for I fear that I will get flamed. What a joke! There are many other places to go and get

RE: [PHP] Regex for Validating URL

2004-09-02 Thread Justin Palmer
Is PHP not open source. What a joke. Justin -Original Message- From: raditha dissanayake [mailto:[EMAIL PROTECTED] Sent: Thursday, September 02, 2004 10:24 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Regex for Validating URL Justin Palmer wrote: I agree Nick

Re: [PHP] Regex for Validating URL

2004-09-02 Thread Jason Wong
On Thursday 02 September 2004 23:17, Justin Palmer wrote: Maybe what this community needs is an advanced mailing list. Arguments for and against splitting lists (in general and not just php lists) into 'newbie' and 'advanced' can be found all over the web. I think that these types of

Re: [PHP] Regex for Validating URL

2004-09-02 Thread John Holmes
From: Justin Palmer [EMAIL PROTECTED] Maybe what this community needs is an advanced mailing list. I think that these types of attitudes just make the new user to php stray away. If we had a section beginners list that if people asked dumb questions, or questions that are stated dumb, some people

Re: [PHP] Regex for Validating URL

2004-09-02 Thread raditha dissanayake
Justin Palmer wrote: Maybe what this community needs is an advanced mailing list. Don't mean to be arrogant but this has been discussed before :-) please refer to the newby guide on how to search the archives. I know many of you will think some contributers are arrogant. But the truth is you

RE: [PHP] Regex for Validating URL OT

2004-09-02 Thread Justin Palmer
, September 02, 2004 10:16 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] Regex for Validating URL OT [snip] I agree Nick for an open source community this list is not very open. Quite a few I am better than you type people on the list. How does that make the beginner feel? I

Re: [PHP] Regex for Validating URL

2004-09-02 Thread Nick Wilson
* and then Jason Wong declared - now re-read what I said. I rest my case. Classic. Thankyou Jason, you're a star. I really didnt apreciate just how inept at interaction with peers you truly were. Beautiful, very kind of you to share your wit and comprehension with us all. -- Nick W --

Re: [PHP] Regex for Validating URL

2004-09-02 Thread John Holmes
From: Jason Wong [EMAIL PROTECTED] I usually reserve my more elegant prose for my sweetheart. Please stop call me that... it creeps me out. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Regex for Validating URL

2004-09-02 Thread Nick Wilson
* and then John Holmes declared Who determines advanced vs. newbie? I think that's another discussion. mean guys You belittle the point. It's not about hurt feelings, it about respect for other people and common courtesty: The cornerstones of community. I dont have a problem with

Re: [PHP] Regex for Validating URL

2004-09-02 Thread Nick Wilson
* and then John Nichel declared http://www.google.com/search?hl=enie=UTF-8q=validate+url+php+regular+expressionbtnG=Google+Search Is that enough, or do you want one of us to write the code for you too? You misunderstand me. Im sorry you feel that way. I'll have a look at it now,

RE: [PHP] Regex for Validating URL

2004-09-02 Thread Dan Joseph
Ahem... No, Jason was right (in his usual, abrupt, rude kinda way). Guys, while we may be able to debate what is rude, what is blunt, what should have been said, what was said, the facts are clear. He apologized, and I think its time to lest this debate rest for now. While I would

Re: [PHP] Regex for Validating URL

2004-09-02 Thread Nick Wilson
* and then Manuel Lemos declared Does anyone have the regex to make sure an http address is full and without error? like http://www.example.com Usually I use this expression: '^(http|https)\://(([-!#\$%\'*+.0-9=?A-Z^_`a-z{|}~^?]+\.)+[A-Za-z]{2,6})(\:[0-9]+)?(/)?/' DING DING DING!!

Re: [PHP] Regex for Validating URL OT

2004-09-02 Thread Jay Blanchard
[snip] I agree Nick for an open source community this list is not very open. Quite a few I am better than you type people on the list. How does that make the beginner feel? I better not ask a question, for I fear that I will get flamed. What a joke! There are many other places to go and get

Re: [PHP] Regex for Validating URL

2004-09-02 Thread Nick Wilson
* and then Justin Palmer declared Is PHP not open source. What a joke. agreed, that was ridiculous. -- Nick W -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Regex for Validating URL

2004-09-02 Thread John Nichel
John Holmes wrote: I don't know what camp most of you consider me in and it doesn't really matter. Summer's over. School's back in. What are you still doing at camp? ;) -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Regex for Validating URL

2004-09-02 Thread Robert Cummings
Would this be a good time to bring up the argument in favour of freedom to top post? Ducking and running, Rob. On Thu, 2004-09-02 at 13:34, John Holmes wrote: From: Justin Palmer [EMAIL PROTECTED] Maybe what this community needs is an advanced mailing list. I think that these types of

Re: [PHP] Regex for Validating URL

2004-09-02 Thread Jim Grill
Ahem... No, Jason was right (in his usual, abrupt, rude kinda way). Guys, while we may be able to debate what is rude, what is blunt, what should have been said, what was said, the facts are clear. He apologized, and I think its time to lest this debate rest for now. While I would

Re: [PHP] Regex for Validating URL

2004-09-02 Thread John Nichel
Nick Wilson wrote: So chill the fuck out and be nice okay` I'll do you one better, and just filter you outhow's that? And when you say something like this to one of the most respected (not to mention one of the nicest) members of this list, I'm sure I won't be the only one. Welcome to

Re: [PHP] Regex for Validating URL

2004-09-02 Thread Curt Zirzow
* Thus wrote Nick Wilson: * and then Manuel Lemos declared Does anyone have the regex to make sure an http address is full and without error? like http://www.example.com Usually I use this expression:

[PHP] regex to remove NL and CR

2004-08-17 Thread Kathleen Ballard
I am extracting text from a text datatype field of a database. The target text is marked (beginning and end) by html comments that have a known--but not uniform--format. Unfortunately, the web-based interface used to maintain the data inserted hard line breaks in the text. I initially tried

[PHP] regex to remove NL and CR

2004-08-17 Thread Kathleen Ballard
I am extracting text from a text datatype field of a database. The target text is marked (beginning and end) by html comments that have a known--but not uniform--format. Unfortunately, the web-based interface used to maintain the data inserted hard line breaks in the text. I initially tried

Re: [PHP] regex to remove NL and CR

2004-08-17 Thread Tom Rogers
Hi, Wednesday, August 18, 2004, 9:09:02 AM, you wrote: KB I am extracting text from a text datatype field of a KB database. The target text is marked (beginning and KB end) by html comments that have a known--but not KB uniform--format. Unfortunately, the web-based KB interface used to maintain

[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

Re: [PHP] Regex (Phone Number)

2004-07-26 Thread Burhan Khalid
Albert Padley wrote: I have been struggling with a javascript regex validation for U.S. phone This is a PHP list. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Regex (Phone Number)

2004-07-26 Thread Curt Zirzow
* Thus wrote Albert Padley: I have been struggling with a javascript regex validation for U.S. phone numbers all afternoon. This is part of Manuel Lemos' Formsgen class. This is limited to the 7 digit number sans 3 digit area code. To be complete, the regex should disallow a phone number

[PHP] Regex (Phone Number)

2004-07-25 Thread Albert Padley
I have been struggling with a javascript regex validation for U.S. phone numbers all afternoon. This is part of Manuel Lemos' Formsgen class. This is limited to the 7 digit number sans 3 digit area code. To be complete, the regex should disallow a phone number that begins with 0 or 1, 555 or

[PHP] regex problem

2004-07-01 Thread Josh Close
I'm trying to get a simple regex to work. Here is the test script I have. #!/usr/bin/php -q ? $string = hello\nworld\n; $string = preg_replace(/[^\r]\n/i,\r\n,$string); $string = addcslashes($string, \r\n); print $string; ? This outputs hell\r\nworl\r\n so it's removing the char before the

Re: [PHP] regex problem

2004-07-01 Thread Justin Patrin
On Thu, 1 Jul 2004 16:41:50 -0500, Josh Close [EMAIL PROTECTED] wrote: I'm trying to get a simple regex to work. Here is the test script I have. #!/usr/bin/php -q ? $string = hello\nworld\n; $string = preg_replace(/[^\r]\n/i,\r\n,$string); $string =

Re: [PHP] regex problem

2004-07-01 Thread Josh Close
Why is it taking the char before the [^\r] also? -Josh On Thu, 1 Jul 2004 15:17:04 -0700, Justin Patrin [EMAIL PROTECTED] wrote: On Thu, 1 Jul 2004 16:41:50 -0500, Josh Close [EMAIL PROTECTED] wrote: I'm trying to get a simple regex to work. Here is the test script I have.

Re: [PHP] regex problem

2004-07-01 Thread Curt Zirzow
* Thus wrote Justin Patrin: On Thu, 1 Jul 2004 16:41:50 -0500, Josh Close [EMAIL PROTECTED] wrote: I'm trying to get a simple regex to work. Here is the test script I have. #!/usr/bin/php -q ? $string = hello\nworld\n; $string = preg_replace(/[^\r]\n/i,\r\n,$string); $string

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

[PHP] Regex

2004-03-31 Thread Brent Clark
Hi all does anyone know of a regex expression to get only the number number from after the Code 39 Kind Regards Brent Clark 1 barcodes found Code 39-10005215 This is the search1 barcodes found 2 barcodes found Code 39-10005216 Datalogic 2 of 5-4 This is the search2 barcodes found 1 barcodes

Re: [PHP] Regex

2004-03-31 Thread Red Wingate
preg_match( #39-([0-9]{8})# , $source , $result ); Brent Clark wrote: Hi all does anyone know of a regex expression to get only the number number from after the Code 39 Kind Regards Brent Clark 1 barcodes found Code 39-10005215 This is the search1 barcodes found 2 barcodes found Code

Re: [PHP] Regex

2004-03-31 Thread Burhan Khalid
Brent Clark wrote: Hi all does anyone know of a regex expression to get only the number number from after the Code 39 Kind Regards Brent Clark 1 barcodes found Code 39-10005215 $barcodes = Code 39-10005216; $parts = explode(,$barcodes); echo Number is .$parts[1]; Might be faster. -- PHP

Re: [PHP] Regex

2004-03-31 Thread Red Wingate
Faster, but wrong. Take a look at his question and examples. Burhan Khalid wrote: Brent Clark wrote: Hi all does anyone know of a regex expression to get only the number number from after the Code 39 Kind Regards Brent Clark 1 barcodes found Code 39-10005215 $barcodes = Code 39-10005216;

Re: [PHP] Regex

2004-03-31 Thread John W. Holmes
From: Burhan Khalid [EMAIL PROTECTED] Brent Clark wrote: Hi all does anyone know of a regex expression to get only the number number from after the Code 39 Kind Regards Brent Clark 1 barcodes found Code 39-10005215 $barcodes = Code 39-10005216; $parts = explode(,$barcodes);

RE: [PHP] Regex

2004-03-31 Thread Daevid Vincent
] Subject: [PHP] Regex Hi all does anyone know of a regex expression to get only the number number from after the Code 39 Kind Regards Brent Clark 1 barcodes found Code 39-10005215 This is the search1 barcodes found 2 barcodes found Code 39-10005216 Datalogic 2 of 5-4

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

Re: [PHP] Regex help (SOLVED)

2004-03-15 Thread Michal Migurski
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

[PHP] regex to change ' to ?

2004-03-04 Thread Adam Williams
What would be the PHP expression to change any and all ' to ? in a variable? I want to change any and all ' in $_POST[data] to ? what would be the statement? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] regex to change ' to ?

2004-03-04 Thread Richard Davey
Hello Adam, Thursday, March 4, 2004, 3:36:06 PM, you wrote: AW What would be the PHP expression to change any and all ' to ? in a AW variable? AW I want to change any and all ' in $_POST[data] to ? $output_array = str_replace(', ?, $_POST); Use this instead of a reg exp for such a simple

Re: [PHP] regex to change ' to ?

2004-03-04 Thread Adam Williams
Thank you, that works great! On Thu, 4 Mar 2004, Richard Davey wrote: Hello Adam, Thursday, March 4, 2004, 3:36:06 PM, you wrote: AW What would be the PHP expression to change any and all ' to ? in a AW variable? AW I want to change any and all ' in $_POST[data] to ? $output_array

[PHP] Regex Help

2004-01-26 Thread karthikeyan
Sorry last time I forgot to put subject on my mail. So here I am putting appropriate subject and sending it. Hi All, Just wondering if somebody can help me with this small regex search. The information I wanted to capture is the one in the Square Bracket. i.e Date : 1/21/04, Race Type: 5-16,

<    1   2   3   4   5   6   7   8   >