On Fri, Jul 27, 2012 at 11:43 AM, Al n...@ridersite.org wrote:
%[\w\d,.]%
\w will match digits so \d isn't necessary, but it will also match
underscores which isn't desired.
David
On 7/27/2012 2:56 PM, David Harkness wrote:
On Fri, Jul 27, 2012 at 11:43 AM, Al n...@ridersite.org wrote:
%[\w\d,.]%
\w will match digits so \d isn't necessary, but it will also match
underscores which isn't desired.
David
You're correct, I forgot about the darn _ and \w includes
On 03/05/2011 04:38 PM, Mark Kelly wrote:
Hi.
Thanks for all the replies.
On Saturday 05 Mar 2011 at 22:11 Simon J Welsh wrote:
On 6/03/2011, at 11:08 AM, Shawn McKenzie wrote:
$regex = '/([^]+)/';
Shawn, this regex gets me two copies of each string - one with and one
without
the
On 6/03/2011, at 11:08 AM, Shawn McKenzie wrote:
On 03/05/2011 09:26 AM, Mark Kelly wrote:
Hi.
I'm hoping someone can help me extract text between double quotes from a
string.
$regex = 'some magic';
$r = preg_match($regex, $sentence, $phrases);
So, if
$sentence = 'Dave said
Hi.
Thanks for all the replies.
On Saturday 05 Mar 2011 at 22:11 Simon J Welsh wrote:
On 6/03/2011, at 11:08 AM, Shawn McKenzie wrote:
$regex = '/([^]+)/';
Shawn, this regex gets me two copies of each string - one with and one without
the double quotes - as did the one Nathan posted
Maybe this will help.
$regex = '/(?=)[^.]*(?=)/';
$r = preg_match_all($regex, $sentence, $phrases);
Erm, you say regex is overkill, then use one in your example!
Thanks,
Ash
http://www.ashleysheridan.co.uk
- Reply message -
From: Al n...@ridersite.org
Date: Fri, Dec 31, 2010 15:53
Subject: [PHP] Re: Regex for telephone numbers
To: php...@lists.php.net, php-general@lists.php.net
On
On 12/31/2010 11:10 AM, a...@ashleysheridan.co.uk wrote:
Erm, you say regex is overkill, then use one in your example!
Thanks,
Ash
http://www.ashleysheridan.co.uk
- Reply message -
From: Aln...@ridersite.org
Date: Fri, Dec 31, 2010 15:53
Subject: [PHP] Re: Regex for telephone numbers
Al wrote:
On 12/29/2010 7:12 PM, Ethan Rosenberg wrote:
Dear List -
Thank you for all your help in the past.
Here is another one
I would like to have a regex which would validate that a telephone
number is in the format xxx-xxx-.
Thanks.
Ethan
MySQL 5.1 PHP 5 Linux
Igor Escobar wrote:
No no, i need to make an regex to match the bold areas in my string.
Anything between single quotes or double quotes (including quotes and
double quotes). Understand?
Regards,
Igor Escobar
Systems Analyst Interface Designer
+ http://blog.igorescobar.com
+
Shawn McKenzie wrote:
Igor Escobar wrote:
No no, i need to make an regex to match the bold areas in my string.
Anything between single quotes or double quotes (including quotes and
double quotes). Understand?
Regards,
Igor Escobar
Systems Analyst Interface Designer
+
On Sep 9, 2008, at 4:38 PM, Nathan Rixham wrote:
Jason Pruim wrote:
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
Jason Pruim wrote:
On Sep 9, 2008, at 4:38 PM, Nathan Rixham wrote:
Jason Pruim wrote:
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
Jason Pruim wrote:
On Sep 9, 2008, at 4:38 PM, Nathan Rixham wrote:
Jason Pruim wrote:
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
On Sep 9, 2008, at 5:02 PM, Nathan Rixham wrote:
Jason Pruim wrote:
On Sep 9, 2008, at 4:38 PM, Nathan Rixham wrote:
Jason Pruim wrote:
Hey everyone,
Not completely specific to php but I know you guys know regex's
better then I do! :)
I am attempting to match
Jason Pruim schreef:
On Sep 9, 2008, at 5:02 PM, Nathan Rixham wrote:
Jason Pruim wrote:
On Sep 9, 2008, at 4:38 PM, Nathan Rixham wrote:
Jason Pruim wrote:
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 Sep 9, 2008, at 12:18 PM, Jochem Maas wrote:
Jason Pruim schreef:
On Sep 9, 2008, at 5:02 PM, Nathan Rixham wrote:
Jason Pruim wrote:
On Sep 9, 2008, at 4:38 PM, Nathan Rixham wrote:
Jason Pruim wrote:
Hey everyone,
Not completely specific to php but I know you guys know
regex's
Jason Pruim schreef:
On Sep 9, 2008, at 12:18 PM, Jochem Maas wrote:
...
I'll have to do some searching :)
always ;-)
The problem with the internet is there is so much out there... Trying to
weed the crap from the food can be a long digestive process which ends
up with MORE crap
Take a look at this function, it'll make things a little easier:
http://us3.php.net/manual/en/function.parse-str.php
Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com
Philip Thompson wrote:
Figured it out. Just needed to stretch my brain a lil.
On Aug 13,
-Original Message-
From: Shawn McKenzie [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 13, 2008 3:31 PM
To: php-general@lists.php.net
Subject: [PHP] Re: regex
Philip Thompson wrote:
Figured it out. Just needed to stretch my brain a lil.
On Aug 13, 2008, at 3:07 PM, Philip
On Aug 13, 2008, at 3:31 PM, Shawn McKenzie wrote:
Philip Thompson wrote:
Figured it out. Just needed to stretch my brain a lil.
On Aug 13, 2008, at 3:07 PM, Philip Thompson wrote:
?php
function blegh ($subject) {
// I know this pattern doesn't exactly work
$pattern =
On Aug 13, 2008, at 4:06 PM, Boyd, Todd M. wrote:
-Original Message-
From: Shawn McKenzie [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 13, 2008 3:31 PM
To: php-general@lists.php.net
Subject: [PHP] Re: regex
Philip Thompson wrote:
Figured it out. Just needed to stretch my brain a
jekillen wrote:
Hello again;
Regarding the error I was inquiring about:
Warning: ereg() [function.ereg]: REG_ERANGE in path info_proc.php on
line 81
I still would like to know what it means but
I solved the script problem.
I found that since $groups is a string that was exploded to form
On 21/08/06, M. Sokolewicz [EMAIL PROTECTED] wrote:
A little harsh but I agree with the sentiment - plus you will get a lot of
pleasure out of it when you see how powerful a tool it is in your arsenal.
--
http://www.web-buddha.co.uk
http://www.projectkarma.co.uk
http://www.php.net/manual/en/reference.pcre.pattern.syntax.php
On 8/22/06, Alex Turner [EMAIL PROTECTED] wrote:
If what you mean is a db table, then it would seem to me that you should
not be using a regex. PHP has rawurlencode() for this sort of thing.
But - you should learn regex ;-)
Try
Hi,
I can't answer your regexp question but some
thoughts on file() etc.:
- file() returns the contents line by line as an
array, so this makes only
sense if you need the contents in this form, e.g.
for looping through each
line and applying a function or whatever
- fread() requires a
Kathleen Ballard a écrit :
Thanks! Works like a charm!
I am the very lowest of newbies when it comes to regex
and working through your solutions has been very
educational. I have one question about something I
couldn't figure out:
#h[1-9](.*)/h[1-9]#Uie
`h([1-6]).*?/h\1)`sie
What is the
Thanks! Works like a charm!
I am the very lowest of newbies when it comes to regex
and working through your solutions has been very
educational. I have one question about something I
couldn't figure out:
#h[1-9](.*)/h[1-9]#Uie
`h([1-6]).*?/h\1)`sie
What is the purpose of the back-ticks and
Hi Ben,
Your code works but If i remove the delimter [] which
I gave so that you could capture the data which needs to be
picked it doesnt work?. Any help?
Karthikeyan B
- Original Message -
From: Ben Ramsey [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; Karthikeyan
[EMAIL PROTECTED]
Sent:
Why do you need to remove the delimeters? If you remove them, then it
makes it quite difficult to get the data you need. If you want to
display the date and race type without the square brackets around them,
then use $matches[0][1] and $matches[1][1] instead of $matches[0][0] or
On Fri, 2003-10-10 at 16:18, Curt Zirzow wrote:
On Fri, 10 Oct 2003 14:01:00 -0400 (EDT), Lists [EMAIL PROTECTED] wrote:
I do not know if this is the right list, but if someone could help me
with the following
Sure, I'll be glad to help.
I need a function that does this:
I'm
Merlin wrote:
^\/test\/contact.html$
does not work. I am sorry, I just found that
it has to be:
test/contact.html
and not
dir/test/contact.html
there is no leading slash.
Do you have any other suggestion?
Are you making this too hard?
if($string = 'test/contact.html')
{ echo 'good'; } else {
John W. Holmes wrote:
Merlin wrote:
^\/test\/contact.html$
does not work. I am sorry, I just found that
it has to be:
test/contact.html
and not
dir/test/contact.html
there is no leading slash.
Do you have any other suggestion?
Are you making this too hard?
if($string = 'test/contact.html')
[snip]
if($string = 'test/contact.html')
That's
if($string == 'test/contact.html')
of course... :)
[/snip]
it could be
if($string == test/contact.html)
couldn't resist :)
Jay
P.S. John, nothing on that thing yet.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Jay Blanchard wrote:
if($string == 'test/contact.html')
it could be
if($string == test/contact.html)
not to start a flame war or anything, but isn't the apostrophe version
quicker, as it doesn't ask the server to parse the string?
Kae
--
PHP General Mailing List (http://www.php.net/)
To
So
^[^/]+/[^/]*
or
^!(partner/)
Merlin wrote:
ufff.. sorry guys, but I have to explain that better. I appreciate your
help, maybe I did not give enough info.
I am trying to redirect with apache modrewrite. To do this you have to use
regex (not if functions:-)
My problem is, that there are
does not work. Is there not a way to exclude the word partner like you
triede with !(partner) ?
merlin
Marek Kilimajer [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
So
^[^/]+/[^/]*
or
^!(partner/)
Merlin wrote:
ufff.. sorry guys, but I have to explain that better.
* Thus wrote Merlin ([EMAIL PROTECTED]):
ufff.. sorry guys, but I have to explain that better. I appreciate your
help, maybe I did not give enough info.
I am trying to redirect with apache modrewrite. To do this you have to use
regex (not if functions:-)
I'm not sure what you expect since
* Thus wrote Kae Verens ([EMAIL PROTECTED]):
Jay Blanchard wrote:
if($string == 'test/contact.html')
it could be
if($string == test/contact.html)
not to start a flame war or anything, but isn't the apostrophe version
quicker, as it doesn't ask the server to parse the string?
heh,
So, what you want is to pretty much use this regex
/^(.*)([^\/]+)\/([^\/]+)$/
when matched on this URI, the backreferences will contain
\\1 partner/
\\2 name
\\3 contact.html
\\4 .html
partner/name/contact.html
I have not tested it, but I just guess it will work ;) Wanna
sven wrote:
looks like id3v2 ;-)
how about this:
$string = [TIT2] ABC [TPE1] GHI [TALB] XYZ;
$pattern = /\[TIT2\]([^]*)/; // matches anything exept ''; till '' or
end of string
preg_match($pattern, $string, $match);
var_export($match);
Yeah, Im trying to figure out a way to parse these tags.
--
True, but since the code is being run by 3rd parties, I don't have a
guarantee that
the browsecap.ini file is available on the server.
Monty wrote:
Maybe it might be easier to just use the get_browser() function:
http://www.php.net/manual/en/function.get-browser.php
Monty
--
PHP General
-Original Message-
From: Monty [mailto:[EMAIL PROTECTED]
Sent: 31 May 2003 21:21
If you want the entire string to be tested for digits, you
need to add the
length of the string to the regex pattern:
$length = strlen($data);
preg_match([0-9]{$length}, $data);
Or anchor
Hi Richard:
On Mon, Jul 29, 2002 at 05:02:49AM -0500, Richard Lynch wrote:
For starters, if Perl wants \ PHP needs \\ since \ is special in both
languages.
I'm curiuos what you're talking about. The manual says nothing about this
in the PCRE section:
Example 1. Examples of valid
44 matches
Mail list logo