On 7/27/2012 2:56 PM, David Harkness wrote:
On Fri, Jul 27, 2012 at 11:43 AM, Al 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 digits
So, how's
On Fri, Jul 27, 2012 at 11:43 AM, Al wrote:
> "%[\w\d,.]%"
>
"\w" will match digits so "\d" isn't necessary, but it will also match
underscores which isn't desired.
David
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
Maybe this will help.
$regex = '/(?<=")[^.]*(?=")/';
$r = preg_match_all($regex, $sentence, $phrases);
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 e
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
>>
>> $sen
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
>>
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: "Al"
Date: Fri, Dec 31, 2010 15:53
Subject: [PHP] Re: Regex for telephone numbers
To:,
On 12/29
Erm, you say regex is overkill, then use one in your example!
Thanks,
Ash
http://www.ashleysheridan.co.uk
- Reply message -
From: "Al"
Date: Fri, Dec 31, 2010 15:53
Subject: [PHP] Re: Regex for telephone numbers
To: ,
On 12/29/2010 7:12 PM, Ethan Rosenberg wrote:
> Dear List -
>
> Th
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
>>
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
>
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 comin
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 bett
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 purl.sch
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 purl.schreurprinting.com/jaso
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
>>> purl.schreurpr
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
purl.schreurprinting.com/p.php?purl=j
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
Here
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 l
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:
$pattern = '/(.*).php\?action=([^&]+)+/';
preg_match ($pattern, $subject, $matches);
return $matches;
}
blegh
> -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
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
jekillen wrote:
Hello again;
Regarding the error I was inquiring about:
Warning: ereg() [function.ereg]: REG_ERANGE in _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 the
$g_lis
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
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
> 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() re
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:
#(.*)#Uie
`.*?`sie
What is the purpose of the back-ticks and 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:
#(.*)#Uie
`.*?`sie
What is the purpose of the back-ticks and the '#'?
What are 'Uie' and
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
$matches[1][0
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
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 th
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 kn
* 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 str
* 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 sin
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 expla
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 member
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 unsu
[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:
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')
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 {
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 t
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 Mai
> -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);
I had no idea their was a is_numeric function(). Ill check it out. Its
probably a lot better to use then trying to preg_match()/
Many thanks
- Original Message -
From: "Monty" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, May 31, 2003 3:21 PM
Subject: [PHP] Re: regex probl
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 patte
45 matches
Mail list logo