[GRASS-dev] regex problem for r.in.wms

Hamish hamish_b at yahoo.com
Sat Mar 8 23:27:11 EST 2008


re. r.in.wms XML paring code for layers with spaces in the name

given some text like this:

DATA="<Name>Foo Bar Baz</Name>"
echo "$DATA" | sed -e "s/<Name>\s*\(\w*\)/~\1~/g" -e "s/<\/Name>//g"

you get
 ~Foo~ Bar Baz

instead of
 ~Foo Bar Baz~

how to fix that regex?


Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 

More information about the grass-dev mailing list