Regex Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreRegex Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 5th, 2010, 05:29 AM
nicolanicola nicolanicola is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2010
Posts: 1 nicolanicola User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 m 58 sec
Reputation Power: 0
Information about regex please

I'm doing an essay on regular expressions used in PHP but I can't find anything that acts as an overview.

I want to know:-

1. Do regex only run if you have a specific program installed? I am reading a book on them and it mentions Egrep and that you need to install egrep to use it. Do you have to install lots of programs to use specific regexs then?

2. How many different regex languages are there? Is it only POSIX and Perl-compatible? I know those are the only two supported in PHP, but are they more?

Think thats all so far!

Thank you in advance.

Reply With Quote
  #2  
Old January 5th, 2010, 08:37 AM
ManiacDan's Avatar
ManiacDan ManiacDan is offline
Likely to be eaten by a grue.
Dev Shed God 10th Plane (9500 - 9999 posts)
 
Join Date: Oct 2006
Location: Pennsylvania, USA
Posts: 9,811 ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)  Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 2 Months 3 Weeks 19 h 13 m 52 sec
Reputation Power: 6112
1) No, PHP has multiple built-in regular expression parsers.

2) There are various "flavors" of regular expressions, some languages have complete perl-compatible support, and some of them trail off. PHP, in particular, can't do a lookaround for a string longer than one character, while perl can. The ASP/.NET regular expression engine also has a fault that I can't remember right now. You can pretty much consider them all the same for basic things, it's only once you become an expert that you need to worry about compatibility between languages.

The wiki article is bound to know more than us.

-Dan
__________________
HEY! YOU! Read the New User Guide and Forum Rules

"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

"The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.

Reply With Quote
  #3  
Old January 6th, 2010, 01:22 PM
lonekorean lonekorean is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2010
Location: Norcross, GA
Posts: 8 lonekorean User rank is Sergeant Major (2000 - 5000 Reputation Level)lonekorean User rank is Sergeant Major (2000 - 5000 Reputation Level)lonekorean User rank is Sergeant Major (2000 - 5000 Reputation Level)lonekorean User rank is Sergeant Major (2000 - 5000 Reputation Level)lonekorean User rank is Sergeant Major (2000 - 5000 Reputation Level)lonekorean User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 h 41 m 10 sec
Reputation Power: 0
Most programming languages have regex capabilities built in, and yes, there are different flavors of regex between different languages, though many of them will try to mimic the same syntax, and even for those that don't, the vast majority of regex elements are the same.

Like ManiacDan said, it's not until you get knee-deep in regex that you really need to worry about the differences.

For more info and comparisons between regex flavors, go to Wikipedia and search for "comparison of regular expression engines".

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreRegex Programming > Information about regex please

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap