Re: [PHP] regex

2005-05-05 Thread Petar Nedyalkov
On Wednesday 04 May 2005 21:31, Sebastian wrote: very new to regex i have a string with bbcode such as [img=XXX] (XXX being numeric) how do i search the string for the value of the bbcode and compare it to another variable? so i can take XXX and compare it to $image dynamically. Try this

Re: [PHP] regex

2005-05-04 Thread Sebastian
i partly solved the problem using this regex: $tutorial['pagetext'] = preg_replace_callback('#\[img\]\s*(\d+)\s*\[/img\]#siU', 'image_code_callback', $content['pagetext']); except instead of using [img]foo[/img] i would like to do just [img=foo] any help? Sebastian wrote:

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

2005-03-21 Thread Richard Lynch
On Sun, March 20, 2005 3:18 pm, Colin Ross said: I'm trying to compress down a php-powered javascript file. In the file i have php run a bunch of loops and foreaches to build huge nested arrays for use in the javascript. Have you considered using PHP to write JavaScript that will build the

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

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

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

Re: [PHP] regex issue

2004-11-30 Thread Greg Donald
On Tue, 30 Nov 2004 17:18:33 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: All I want to do is capture the keyword (array, break, echo, etc) and color it. I'd do it like this: $source = 'this is a line of text'; $term = 'line'; $text = eregi_replace(($term), font color=red\\1/font,

RE: [PHP] regex issue

2004-11-30 Thread nate
: Re: [PHP] regex issue On Tue, 30 Nov 2004 17:18:33 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: All I want to do is capture the keyword (array, break, echo, etc) and color it. I'd do it like this: $source = 'this is a line of text'; $term = 'line'; $text = eregi_replace(($term), font color

Re: [PHP] regex issue

2004-11-30 Thread Rick Fletcher
[EMAIL PROTECTED] wrote: All I want to do is capture the keyword (array, break, echo, etc) and color it. $txt = this is an array('test'); $pattern = /(array|break|echo|continue)([\(.|\s.|\;.])/; echo preg_replace($pattern, 'font color=red$0/font', $txt); This captures array( though and I just

Re: [PHP] (Regex) not working, take a quick look at it plz?

2004-10-30 Thread Jason Wong
On Friday 29 October 2004 23:12, Ryan A wrote: I totally suck at RegEx (but am trying to learn), I got the following from the web, but its not working for me... can anyone spot what I am doing wrong or whats wrong please? And what *exactly* is wrong? What did you expect the code to do? What

RE: [PHP] Regex Lookbehind help

2004-10-26 Thread Michael Sims
Alex Hogan wrote: Hi All, I am trying to identify an email address in a page but I don't want to return the email if it's [EMAIL PROTECTED] Here's what I have; (\w[-._\w]*\w(?!webmaster)@\w[-._\w]*\w\.\w{2,3}) It returns nothing, however when I take out the lookbehind section; ([EMAIL

Re: [PHP] Regex Lookbehind help

2004-10-26 Thread Alex Hogan
I just tried this out and the first regex is actually working for me on php 4.3.8 (cli). Can you post some code? At this point all I'm trying to do is print the array with the addresses. $file=readfile('mypathto/myfile.html'); $patrn =

RE: [PHP] Regex Lookbehind help

2004-10-26 Thread Michael Sims
Alex Hogan wrote: I just tried this out and the first regex is actually working for me on php 4.3.8 (cli). Can you post some code? At this point all I'm trying to do is print the array with the addresses. $file=readfile('mypathto/myfile.html'); $patrn =

Re: [PHP] Regex Lookbehind help

2004-10-26 Thread Alex Hogan
Check the documentation for preg_match()...it can't be used that way. It returns false or the number of matches, but not the matching text itself. To get the matches you have to supply the third parameter (matches). Plus you'll probably want to use preg_match_all() unless you only want to

RE: [PHP] Regex for Validating URL

2004-09-07 Thread Burhan Khalid
-Original Message- From: Nick Wilson [mailto:[EMAIL PROTECTED] Sent: Thursday, September 02, 2004 11:59 AM 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

Re: [PHP] Regex for Validating URL

2004-09-07 Thread Wouter van Vliet
On Tue, 7 Sep 2004 10:58:48 +0300, Burhan Khalid [EMAIL PROTECTED] wrote: -Original Message- From: Nick Wilson [mailto:[EMAIL PROTECTED] Sent: Thursday, September 02, 2004 11:59 AM Hi all, yeah, i know, i did do quite a bit of searching but I just cant find it... Does anyone have

Re: [PHP] Regex for Validating URL

2004-09-06 Thread Stut
I know this is an old thread but I've been away for the weekend and I really want to say this... On Thu, 2 Sep 2004 20:40:45 +0200, Nick Wilson [EMAIL PROTECTED] wrote: You know guys? I think you all take this a bit too seriously, perdanticness (is there such a word?) is all well and good for

Re: [PHP] Regex for Validating URL

2004-09-03 Thread Nick Wilson
* and then Jim Grill declared 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 admit that harshness runs rampid on

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

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
On Thursday 02 September 2004 18:42, Nick Wilson wrote: * 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 Define FULL and WITHOUT ERROR. Without knowing what *you* mean by full without error, I

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:

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

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 at the

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

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 =

<    1   2   3   4   5   6   >