LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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: 445

Rep: Reputation: 18
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: 148Reputation: 148
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
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:08 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration