gfarrell |
08-18-2010 04:10 AM |
Quote:
Originally Posted by ghostdog74
(Post 4069645)
Code:
awk -vRS="}" '/myFunction:/{
gsub(/.*myFunction:/,"myFunction: (")
gsub(/{.[^}]*/,"...\n");
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.
|