Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: s/[newline]FOO[newline]/\\bar{foo}/sg

by qq (Hermit)
on Jun 30, 2004 at 23:56 UTC ( [id://370942]=note: print w/replies, xml ) Need Help??


in reply to s/[newline]FOO[newline]/\\bar{foo}/sg

perl -p -i.bk -e 's/^ (\w+) $/ \\chapter{$1} /'  *.tex

If there are no spaces before and after the word, remove them from the regex.

qq

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://370942]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (2)
As of 2024-04-26 05:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found