Linux Rocks ! wrote: >Sometime just before Sunday 28 April 2002 04:30 pm Kahli R. Burke Wrote >about:[EUG-LUG:2456] Re: asynchronous file access: ? use chattr +S ? >Kahli, > Thanks! Ill give the perl a try... Im alergic to vi, I use Emacs, but very >little... Perl looks interesting... I was hoping for something a little less >ugly! I was hoping for something more like >blah -a alt=$blah title=$blah <filename(s)> >This doenst look too bad... I can probably handle it :) >Jamie > >: cat file.html | perl -ne 's/alt\s*=\s*"(.*?)"/alt="$1" title="$1"/; print' > It's just a syntax familiarity thing, the regular expression reads a lot like your hypothetical program to me. If you spend some time with regular expressions, the syntax will become clearer and you'll gain an appreciation for how useful they are (and understand why they're so prevalent), syntax notwithstanding...
Kahli
