Hi,
I'd like to use grep to replace one tag in an XML file:
Search For: <num>1</num>
Replace With: <num>3</num>
the next match would be:
Search For: <num>2</num>
Replace With: <num>4</num>
and the next...
Search For: <num>3</num>
Replace With: <num>5</num>
and so on... in other words, find the <num> tag, and replace x inside
with x + 2. Since this XML data goes on forever, it seems like an
ideal job for grep.
I think "Search For:" should be:
<num>[0-9]+</num>
but I'm not sure what Replace With should be...
I'm a definite newbie to grep, so any help would be very much
appreciated...
Thanks,
Alberto
--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to: <[EMAIL PROTECTED]>