472,789 Members | 1,261 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,789 software developers and data experts.

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 2941
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: zOrg | last post by:
hi, i'm using the preg_match_all() function to parse an asp file and find all include file within this file : asp include strings can be : <!--#include virtual="/dir/file.asp"--> or...
11
by: Martin Robins | last post by:
I am trying to parse a string that is similar in form to an OLEDB connection string using regular expressions; in principle it is working, but certain character combinations in the string being...
4
by: Reddy | last post by:
Hi, Can anyone suggest good resources on the net to learn "Regular Expressions". Regards, Srinivas
11
by: Ron Rohrssen | last post by:
Slightly off topic.... How can I write a regex that limits user input to 3 digits in the range of 1-128? I've been trying \d{1,128} but this allows for a match on more than 3 digits. ...
8
by: Andrew Banks | last post by:
Can anyone help me out with regular expressions for the following? 1: Check that a number entered contains no letters and is between 0 and 99. Numers under ten can be entered as "01" "02" "03" or...
3
by: Murphy | last post by:
Can a regular expression validator force a user to enter exactly 10 numeric digits ? Thanks Murphy
1
by: Showjumper | last post by:
I need a regulr expression that cn be used to find <a> tags with the href attribute set to mailto:. I need to be to search out all the email addresses in the text of the pages in a website. So for...
9
by: Schorschi | last post by:
Not having used regular expressions much, I need some help. Given a string... "This\0Guy\0Needs\0Some\0Help\0\0\0\0\0" Need result as array of strings... "This","Guy", "Needs", "Some", "Help" ...
3
by: Lee Grissom | last post by:
I want to parse the following string into 3 parts per match. I almost got it, but my expression has a flaw in it. I tried this, but didn't quite work the way I expect on the second match b/c...
0
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.