[H-GEN] regex brian fade

Russell Stuart russell-humbug at stuart.id.au
Fri Jun 5 00:41:19 EDT 2015


On Fri, 2015-06-05 at 14:16 +1000, mick wrote:
> [ Humbug *General* list - semi-serious discussions about Humbug and     ]
> [ Unix-related topics. Posts from non-subscribed addresses will vanish. ]
> 
> I'm trying to extract occurrances of <tag k="(KEY)" from an openstreetmap XML file where KEY is a random number of characters a-z, A-Z 0-9 or :(colon). I'm sure I've done it before but can't remember how. Below is the closest I can get
> 
> grep -o -e "<tag k=\"[a-z]" ~/Documents/gis/OSM-AU/new_south_wales.osm

grep -o -e '<tag k="[a-z]*"' ~/Documents/gis/OSM-AU/new_south_wales.osm




More information about the General mailing list