logo       

Re: Unexpected replacement: msg#00056

editors.sed.user

Subject: Re: Unexpected replacement

gregh_oh wrote:
> Why is sed not stopping at the first occurrence of EXPAND?
> I'm sure that the answer is simple, but I just can't see it.

Sed regexps are greedy. The regex "foo.*bar" will match the entirety of the
string "foo_bar_baz_bar".

Why not use

/^<menutree:TREENODE \{1,\}TEXT *= *"Updates"/s/"Updates"/%Choice%/

Of course, you'll have to escape stuff as you have done in your own
expression so that cmd.exe doesn't mangle it.

Regards,
Angus



------------------------ Yahoo! Groups Sponsor --------------------~-->
Most low income homes are not online. Make a difference this holiday season!
http://us.click.yahoo.com/5UeCyC/BWHMAA/TtwFAA/dkFolB/TM
--------------------------------------------------------------------~->

--

Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/sed-users/

<*> To unsubscribe from this group, send an email to:
sed-users-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/







<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise