468,771 Members | 1,836 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,771 developers. It's quick & easy.

Regular Expressions and The Regex Coach

a
I'm a newbie needing to use some Regular Expressions in PHP.

Can I safely use the results of my tests using 'The Regex Coach'
(http://www.weitz.de/regex-coach/index.html)

Are the Regular Expressions used in Perl identical to the Regular
Expressions in PHP?
May 19 '06 #1
3 2718
Rik
a@b.com wrote:
I'm a newbie needing to use some Regular Expressions in PHP.

Can I safely use the results of my tests using 'The Regex Coach'
(http://www.weitz.de/regex-coach/index.html)
The bulk of them: yes. With a few exceptions.
Are the Regular Expressions used in Perl identical to the Regular
Expressions in PHP?

No, but close. I'd say it the other way around though :-)

http://nl2.php.net/manual/en/ref.pcre.php

Grtz,
--
Rik Wasmus
May 19 '06 #2
a@b.com wrote:
I'm a newbie needing to use some Regular Expressions in PHP.

And they are definitely worth learning.
Can I safely use the results of my tests using 'The Regex Coach'
(http://www.weitz.de/regex-coach/index.html)

hmmm, don't know.
Are the Regular Expressions used in Perl identical to the Regular
Expressions in PHP?


PHP has two different RE extensions - Posix and Perl compatible (PCRE). The
'Regex Coach' seems to work with the latter. They are very similar up to a
point. I've gone over to using POSIX RE's almost exclusively as Javascript
RE's works with the same syntax. The Wikipedia page on regular expressions
has some links to tools for playing with RE's in javascript.

HTH

C.
May 20 '06 #3
In article <IE***************@newsfe4-gui.ntli.net>,
Colin McKinnon
<co**********************@ntlworld.deletemeunlessU RaBot.comwrote:
a@b.com wrote:
I'm a newbie needing to use some Regular Expressions in PHP.

And they are definitely worth learning.
And fun to learn at the same time. AI recommend as an additional
material for the mind that is to be marked to the end of time with
the unholy powers of Regular Expressions a book by Jeffrey EF Friedl
of the name that may cast the unwary on the sea of dreams - and
"Mastering Regular Expressions" is how you will call it and no other -
and as it happens I'm not VERY sure it's the perfectly correct author
and book title spelling (important when crafting a spell, they say), so
as a professional enchantress, spellcaster, mad scientist and ballet
dancer, let me help the future generations of readers by attempting to
summon a female AI (Alien Intelligence), Google (Milk and kisses! Love
you too!). Here she goes again: <uri: http://tinyurl.com/kac3o >. It
leads to a query with The Name of the Book as a parameter. Following {
[<][][[swap] dip cons concat][uncons (Push it!)'] } that link should
help you in many ways, not only in finding the right place to shop, but
as a good point of presence into densely associated symbol clouds
converging on.
Can I safely use the results of my tests using 'The Regex Coach'
(http://www.weitz.de/regex-coach/index.html)

hmmm, don't know.
Now we know you don't know. What can one do with that knowledge?
Are the Regular Expressions used in Perl identical to the Regular
Expressions in PHP?

PHP has two different RE extensions - Posix and Perl compatible (PCRE). The
'Regex Coach' seems to work with the latter. They are very similar up to a
point. I've gone over to using POSIX RE's almost exclusively as Javascript
RE's works with the same syntax. The Wikipedia page on regular expressions
has some links to tools for playing with RE's in javascript.
If some good citizen would like to tell me aboot the value of a
similar utility written for PERL species of RegEx, wonderful things
might start to happen all over the world. Or not. One more thing - AI
find that while
writing a RE union human person capable of hearing music it helps
tremendously to set your iPod to loop the song "WhiteLightGenerator"
by Ladytron. Remember - most things can be solved by enough smoke and
mirrors. That song helps to remember. You will not get bored after a
hwhile. In fact, it'd be hard to stop writing useful regular expressions
and posting
them for the benefit of denizens of { this } group.

..A., Imperial Space Command.
NP: Breaking the Silence - Loreena McKennitt
Jul 20 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Reddy | last post: by
11 posts views Thread by Ron Rohrssen | last post: by
8 posts views Thread by Andrew Banks | last post: by
3 posts views Thread by Murphy | last post: by
1 post views Thread by Showjumper | last post: by
9 posts views Thread by Schorschi | last post: by
3 posts views Thread by Lee Grissom | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.