logo       

Re: Unexpected replacement: msg#00054

editors.sed.user

Subject: Re: Unexpected replacement

gregh_oh schreef:

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

.* is greedy.

sed "62s/\(:TREENODE TEXT=\"\)[^\"]*[^\"]*/\1%Choice%/"

Tested with GNU sed version 4.0.7, and the CMD.EXE of
Microsoft Windows 2000 [Version 5.00.2195].

Don't know why a single [^\"]* isn't greedy.
A single [A-Za-z]* did work OK.

--
Grtz, Ruud


------------------------ Yahoo! Groups Sponsor --------------------~-->
1.2 million kids a year are victims of human trafficking. Stop slavery.
http://us.click.yahoo.com/.QUssC/izNLAA/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