Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


  Search this Thread
Old 04-17-2011, 02:57 PM   #1
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

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 ?

Old 04-17-2011, 03:39 PM   #2
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.

Old 04-19-2011, 01:10 AM   #3
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.10, Centos 7.5
Posts: 17,645

Rep: Reputation: 2482Reputation: 2482Reputation: 2482Reputation: 2482Reputation: 2482Reputation: 2482Reputation: 2482Reputation: 2482Reputation: 2482Reputation: 2482Reputation: 2482
They are different; see 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.


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 > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:04 PM.

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