I'm normally OK with regex, especially if I fiddle with it long enough,
however I have fiddled with this one so long that I'm either totally
missing it or it's something simple. Does it have anything to do with
the backref, or the fact that the value of the backref has a $? I have:
$out = '
On Fri, Mar 27, 2009 at 9:40 AM, Shawn McKenzie nos...@mckenzies.net wrote:
I'm normally OK with regex, especially if I fiddle with it long enough,
however I have fiddled with this one so long that I'm either totally
missing it or it's something simple. Does it have anything to do with
the
haliphax wrote:
On Fri, Mar 27, 2009 at 9:40 AM, Shawn McKenzie nos...@mckenzies.net wrote:
I'm normally OK with regex, especially if I fiddle with it long enough,
however I have fiddled with this one so long that I'm either totally
missing it or it's something simple. Does it have anything
Hey everyone,
Not completely specific to php but I know you guys know regex's
better then I do! :)
I am attempting to match purl.schreurprinting.com/jasonpruim112 to
purl.schreurprinting.com/p.php?purl=jasonpruim112
Here are my current matching patterns:
RewriteRule
-Original Message-
From: Jason Pruim [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 09, 2008 7:30 AM
To: PHP-General List
Subject: [PHP] Regex help
Hey everyone,
Not completely specific to php but I know you guys know regex's
better then I do! :)
I am attempting to match
On May 16, 2006, at 7:53 PM, Chrome wrote:
-Original Message-
From: Robert Samuel White [mailto:[EMAIL PROTECTED]
Sent: 17 May 2006 01:42
To: php-general@lists.php.net
Subject: RE: [PHP] Regex Help for URL's [ANSWER]
That's what I was doing. I was parsing A:HREF, IMG:SRC, etc
This one time, at band camp, Robert Samuel White [EMAIL PROTECTED] wrote:
Don't be rude. I've already don't all of that. Nothing came up. I've been
programming for 20 years (since I was 11 years old) so I'm not a slacker
when it comes to learning new things, however, I have always found
Can someone help me modify the following code?
It was designed to search for all instances of [LEVEL#]...[/LEVEL#]
I need a preg_match_all that will search for all of instances of an URL.
It should be sophisticated enough to find something as complicated as this:
Robert Samuel White wrote:
Can someone help me modify the following code?
It was designed to search for all instances of [LEVEL#]...[/LEVEL#]
I need a preg_match_all that will search for all of instances of an URL.
It should be sophisticated enough to find something as complicated as this:
: [PHP] Regex Help for URL's
Robert Samuel White wrote:
Can someone help me modify the following code?
It was designed to search for all instances of [LEVEL#]...[/LEVEL#]
I need a preg_match_all that will search for all of instances of an URL.
It should be sophisticated enough to find
On Tue, 2006-05-16 at 16:31, Robert Samuel White wrote:
Don't be rude. I've already don't all of that. Nothing came up. I've been
programming for 20 years (since I was 11 years old) so I'm not a slacker
when it comes to learning new things, however, I have always found regular
expressions
it makes the email hard to read.
Why is top posting bad?
-Original Message-
From: Jochem Maas [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 16, 2006 4:28 PM
To: Robert Samuel White
Cc: php-general@lists.php.net
Subject: Re: [PHP] Regex Help for URL's
Robert Samuel White wrote:
Can
I am trying to get all of the urls in a web document, so that I can append
information to the urls when needed (when the url points to a domain that
resides on my server). It allows me to pass session information across the
domains of my network. Currently, I use a class I wrote to handle this,
: Re: [PHP] Regex Help for URL's
Robert Samuel White wrote:
Can someone help me modify the following code?
It was designed to search for all instances of [LEVEL#]...[/LEVEL#]
I need a preg_match_all that will search for all of instances of an URL.
It should be sophisticated enough to find
-Original Message-
From: Robert Samuel White [mailto:[EMAIL PROTECTED]
Sent: 16 May 2006 21:32
To: php-general@lists.php.net
Subject: RE: [PHP] Regex Help for URL's
Don't be rude. I've already don't all of that. Nothing came up. I've
been
programming for 20 years (since I
In case any one is looking for a solution to a similar problem as me, here
is the answer. I used the code from my original post as my guiding light,
and with some experimentation, I figured it out.
To get any URL, regardless of where it is located, use this:
preg_match_all(#\'http://(.*)\'#U,
On Tue, 2006-05-16 at 18:49, Robert Samuel White wrote:
In case any one is looking for a solution to a similar problem as me, here
is the answer. I used the code from my original post as my guiding light,
and with some experimentation, I figured it out.
To get any URL, regardless of where
On Tue, May 16, 2006 6:21 pm, Robert Cummings wrote:
On Tue, 2006-05-16 at 18:49, Robert Samuel White wrote:
In case any one is looking for a solution to a similar problem as
me, here
preg_match_all(#(\|')http://(.*)(\|')#U, $content, $matches);
And it's missing the original requirement of
All pages used by my content management system must be in a valid format.
Old-school style pages are never created so the solution I have come up with
is perfect for my needs.
Thank you.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
-Original Message-
From: Robert Samuel White [mailto:[EMAIL PROTECTED]
Sent: 17 May 2006 01:16
To: php-general@lists.php.net
Subject: RE: [PHP] Regex Help for URL's [ANSWER]
All pages used by my content management system must be in a valid format.
Old-school style pages
On Tue, May 16, 2006 4:22 pm, Jochem Maas wrote:
personally I would assume anyone who had been programming for 20 yrs
would have a reasonable understanding of regexps.
Nope.
:-)
I got WAY past 20 year mark before I even began to pretend to
understand the minimal amount of regex I can do now.
, then they'll code their pages to make use of this limitation.
-Original Message-
From: Chrome [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 16, 2006 8:24 PM
To: 'Robert Samuel White'; php-general@lists.php.net
Subject: RE: [PHP] Regex Help for URL's [ANSWER]
-Original Message
-Original Message-
From: Robert Samuel White [mailto:[EMAIL PROTECTED]
Sent: 17 May 2006 01:28
To: php-general@lists.php.net
Subject: RE: [PHP] Regex Help for URL's [ANSWER]
In my opinion, it is the most reasonable solution. I have looked all over
the web for something else
If we are talking clickable links, why not focus on the a construct
itself? Otherwise URLs are just part of the page's textual content... Very
difficult to parse that
Disseminating an a tag isn't brain-meltingly difficult with a regex if
you put your mind to it... With or without quotes, be
-Original Message-
From: Robert Samuel White [mailto:[EMAIL PROTECTED]
Sent: 17 May 2006 01:42
To: php-general@lists.php.net
Subject: RE: [PHP] Regex Help for URL's [ANSWER]
If we are talking clickable links, why not focus on the a construct
itself? Otherwise URLs are just
On Fri, Jan 13, 2006 at 08:25:57AM -0500, Mike Smith wrote:
I'm trying to save myself some time by extracting certain variables
from a string:
102-90 E 42 X 42 X 70 3/8
I've been testing with: http://www.quanetic.com/regex.php
and have been somewhat successful. Using this pattern:
I'm trying to save myself some time by extracting certain variables
from a string:
102-90 E 42 X 42 X 70 3/8
I've been testing with: http://www.quanetic.com/regex.php
and have been somewhat successful. Using this pattern:
/[0-9]{2,}( X| x|x )/
I have:
102-90 E [!MATCH!] [!MATCH!] 70 3/8
Mike Smith wrote:
I'm trying to save myself some time by extracting certain variables
from a string:
102-90 E 42 X 42 X 70 3/8
If this string is always in this format
xxx E panel X width X height
then you could try something like:
// Very much untested
$unit = '102-90 E 42 X 42 X 70 3/8';
This should do the trick:
/(\d+) ?X ?(\d+) ?X ?(\d+ [\d\/]+)/i
(at least it would in Perl)
Le 13 Janvier 2006 08:25, Mike Smith a écrit :
I'm trying to save myself some time by extracting certain variables
from a string:
102-90 E 42 X 42 X 70 3/8
I've been testing with:
Eric, thanks for replying. I couldn't quite get that to work. Albert,
I'm currently working with what you suggested, though the unit names
are not that consistent:
$vals = preg_split(' ?X? ',$unit[1]);
echo strong.$unit[1]./strongbr /\n;
echo Panel: .$vals[0].br /Width: .$vals[1].br /Height:
Why isn't this regular expression
^[A-Za-z0-9\.]+\s*[A-Za-z0-9\.]*$
allowing for this value:
'Co. Dublin' (w/o the single quotes)
? It's failing the regular expression match...
thnx,
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Fri, 2005-11-18 at 10:55, Chris Boget wrote:
Why isn't this regular expression
^[A-Za-z0-9\.]+\s*[A-Za-z0-9\.]*$
allowing for this value:
'Co. Dublin' (w/o the single quotes)
? It's failing the regular expression match...
Do you have that expression embedded in single or double
Chris,
if (preg_match(/^[A-Za-z0-9\.]+\s*[A-Za-z0-9\.]*$/, Co. Dublin))
echo TRUE;
else
echo FALSE;
prints TRUE for me.
Cheers,
David Grant
Chris Boget wrote:
Why isn't this regular expression
^[A-Za-z0-9\.]+\s*[A-Za-z0-9\.]*$
allowing for this value:
'Co. Dublin' (w/o the
Hi, folks. I'm having trouble with a simple regex. I'm sure it's just
something small that I'm missing but nothing I'm trying is working.
In an HTML file I have comments like this:
!-- START PRINT --
various html crap here
!-- END PRINT --
Here's the regex I'm using:
/!-- START PRINT
Hi, folks. I'm having trouble with a simple regex. I'm sure it's just
something small that I'm missing but nothing I'm trying is working.
In an HTML file I have comments like this:
!-- START PRINT --
various html crap here
!-- END PRINT --
Here's the regex I'm using:
/!-- START PRINT
Hi, folks. I'm having trouble with a simple regex. I'm sure it's just
something small that I'm missing but nothing I'm trying is working.
In an HTML file I have comments like this:
!-- START PRINT --
various html crap here
!-- END PRINT --
Here's the regex I'm using:
/!-- START
Greetings folks. Thanks Murray and Philip for the quick responses.
Adding the /s modifier worked perfectly.
Cheers,
Pablo
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
I am trying to implement a regular expression so that I have a number
between 0.00 and 1.00. the following works except I can go up to 1.99
$regexp = /^[0-1]{1}.[0-9]{2}/;
Can anyone help here please?
Thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Shaun wrote:
Hi,
I am trying to implement a regular expression so that I have a number
between 0.00 and 1.00. the following works except I can go up to 1.99
$regexp = /^[0-1]{1}.[0-9]{2}/;
Can anyone help here please?
Thanks
May have to go outside just a regex...
if ( preg_match (
On Mon, 2005-09-19 at 10:11, John Nichel wrote:
Shaun wrote:
Hi,
I am trying to implement a regular expression so that I have a number
between 0.00 and 1.00. the following works except I can go up to 1.99
$regexp = /^[0-1]{1}.[0-9]{2}/;
Can anyone help here please?
Thanks
On Monday 19 September 2005 09:03 am, Shaun wrote:
Hi,
I am trying to implement a regular expression so that I have a number
between 0.00 and 1.00. the following works except I can go up to 1.99
$regexp = /^[0-1]{1}.[0-9]{2}/;
Can anyone help here please?
Thanks
$regexp =
On 8/4/05, Lizet Pena de Sola [EMAIL PROTECTED] wrote:
Ok, it's not the regexp for detecting email addresses what I need,
that's widely published, thanks. I'm using ereg to match this regular
expression:
(On)[\s\w\d\W\S\D\n]*(wr[i|o]te[s]?:)
That will match phrases like
On 8/3/05, Carol
: Marcus Bointon [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 03, 2005 8:57 AM
To: PHP General
Subject: Re: [PHP] Regex help
On 2 Aug 2005, at 15:12, Robin Vickery wrote:
I don't suppose this is the place for a rant about the futility of
checking email addresses with a regexp?
Though I
On 2 Aug 2005, at 15:12, Robin Vickery wrote:
I don't suppose this is the place for a rant about the futility of
checking email addresses with a regexp?
Though I will agree with you to some extent, I've had quite a lot of
success with this, which is pretty thorough:
I'm trying to validate an email address and for the life of me I
cannot figure out why the following regex is not working:
script language=php
$email = [EMAIL PROTECTED];
$regex =
On 8/2/05, Chris Boget [EMAIL PROTECTED] wrote:
I'm trying to validate an email address and for the life of me I
cannot figure out why the following regex is not working:
$email = [EMAIL PROTECTED];
$regex =
On 8/2/05, Robin Vickery [EMAIL PROTECTED] wrote:
I don't suppose this is the place for a rant about the futility of
checking email addresses with a regexp?
-robin
Let Richard Lynch tell him. He's good at regex's, and it's HIS email
address that never makes it through!
Dotan Cohen
Hi Guys,
I am currently creating a once off text parser for a rather large
document that i need to strip out bits of information on certain
lines.
The line looks something like :
Adress line here, postcode, country Tel: +27 112233665 Fax: 221145221
Website: http://www.urlhere.com E-Mail:
I am currently creating a once off text parser for a rather large
document that i need to strip out bits of information on certain
lines.
The line looks something like :
Adress line here, postcode, country Tel: +27 112233665 Fax: 221145221
Website: http://www.urlhere.com E-Mail: [EMAIL
I wanted to create a regex that force a PHP form text field to meet the
following requirements:
a. Must contain an 1 uppercase letter. [A-Z]
b. Must contain 1 digit. [0-9]
c. Must be a minimum of 7 characters in length. {7}
I'm not sure of how to build the correct syntax for using all 3
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)
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 (
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}
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
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
[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
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
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.
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
OK, this is off-topic like every other regex help post, but I know some
of you enjoy these puzzles :)
I need a validation regex that will pass a string. The string can be no
longer than some maximum length, and it can contain any characters except
two consecutive ampersands () anywhere in the
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
[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
[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
[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
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
[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
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
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
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
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
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.
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
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
Hello,
I normally can take a bit of regex fun, but not this time.
Simple enough, in theory... I need to match (count) all of the bold tags
in a string, including ones with embedded styles (or whatever else can
go in there). b and b style=color:red. My attempts keep matching
br as well.
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
Hi All,
I rather badly need some help with a regular expression.
I need to identify the occurrence of the following search string in another
string, and replace it with some text followed by the identified search
string.
search string
pa
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
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.
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
1 - 100 of 150 matches
Mail list logo