LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 04-17-2011, 02:57 PM   #1
golden_boy615
Member
 
Registered: Dec 2008
Distribution: Ubuntu Fedora
Posts: 442

Rep: Reputation: 17
differences between shell regex and php regex and perl regex and javascript and mysql


hello
I want to know what is the difference between regex in linux shell and php and perl and javascript and mysql. Are they the same or not ?I mean by learning one can I use them in other one or there is some small or big differences between them? are they using different parameter and commands ?

Thanks
 
Old 04-17-2011, 03:39 PM   #2
Telengard
Member
 
Registered: Apr 2007
Location: USA
Distribution: Kubuntu 8.04
Posts: 579
Blog Entries: 8

Rep: Reputation: 147Reputation: 147
In my experience you have to carefully read the documentation for each to understand the differences. Honestly it is a total PITA having so many different syntaxes, and I can never keep them straight in my head.

Most GNU programs like grep, find, locate, and others support multiple types of regular expressions which can be specified on invocation. Even more confusingly one must remember different methods of escaping various meta-characters in various environments.

HTH
 
Old 04-19-2011, 01:10 AM   #3
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,225

Rep: Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021
They are different; see http://regex.info/ for the best book imho. Very well written & currently in it's 3rd edition.
Other than that, consult the docs for each language.
 
1 members found this post helpful.
  


Reply

Tags
regular expressions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Perl to find regex and print following 5 lines after regex casperdaghost Linux - Newbie 3 08-29-2010 08:08 PM
php preg_replace and perl regex matching aolong Programming 1 06-02-2009 05:32 PM
need help with regex in perl umbrella2 Programming 5 01-15-2009 09:13 AM
regex with sed to process file, need help on regex dwynter Linux - Newbie 5 08-31-2007 05:10 AM
Perl regex $ ShaqDiesel Programming 6 08-18-2006 02:40 PM


All times are GMT -5. The time now is 11:13 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration