Welcome to the most active Linux Forum on the web.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 08-18-2010, 04:10 AM   #31
LQ Newbie
Registered: May 2010
Location: London
Distribution: Mac OSX, Ubuntu, Debian
Posts: 29

Original Poster
Rep: Reputation: 15

Originally Posted by ghostdog74 View Post
awk -vRS="}" '/myFunction:/{
    gsub(/.*myFunction:/,"myFunction: (")
    print $0RT")" 
}' file
Unfortunately this has only a limited application. I did not, however, realise that awk could do regex, which it can, by the looks of your answer.

My original regex was quite sufficient, I would love to know why it didn't work in perl but did in two regex testers.


perl, regex

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Perl Regex matching HTML hawk__0 Programming 2 03-19-2010 07:57 PM
php preg_replace and perl regex matching aolong Programming 1 06-02-2009 05:32 PM
Matching two wildcards with perl and regex borinus Programming 3 09-09-2008 04:04 AM
Embedded regex matching in Perl GATTACA Programming 5 01-17-2007 09:16 AM
perl regex matching exodist Programming 2 11-15-2004 10:50 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:09 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