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
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
* 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
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,
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
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,
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
* 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
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
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+)
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])?)\.
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])?)\.
* 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.
--
* 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
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 *
* 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])?)\.
[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.
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]
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
* 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
* 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.
* 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
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
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
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
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
* 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).
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
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
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
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
* 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])?)\.
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 -
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
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.
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
[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
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
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
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
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
, 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
* 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
--
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
* 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
* 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,
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
* 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!!
[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
* 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
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,
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
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
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
* 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:
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
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
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
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
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
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
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
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
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),
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
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
* 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
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
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
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 =
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.
* 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
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
* 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
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.
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
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
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
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;
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);
]
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
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:
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
Sorry I to should have added this
this is what im going with so far
preg_match(/\d100.*/);
Kind Regards
Brent Clark
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
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
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
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
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
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:
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);
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
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
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.
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
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
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
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
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
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,
401 - 500 of 733 matches
Mail list logo