[H-GEN] regex brian fade
Stefan Götz
stefan.gotz at mykolab.com
Fri Jun 5 21:51:50 EDT 2015
Hi Mick,
> grep -o -e "<tag k=\"[a-zA-Z0-9:-\_]*\"" ~/Documents/gis/OSM-AU/new_south_wales.osm |sort -u > ~/Documents/gis/OSM-AU/keys.txt
>
> I still have to scan the output list to check the range of characters but thats todays task.
You could try '<tag k="[^"]*"' to a) accept any character in the attribute value and b) avoid having to escape the " characters.
The first few Google hits suggest that the " character is not legal inside XML attribute values, so this should work for any legal XML, but I wouldn't trust a
"should work" from some random guy on a mailing list without double checking.
Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.humbug.org.au/pipermail/general/attachments/20150606/a8a450f5/attachment.sig>
More information about the General
mailing list