[H-GEN] regex brian fade
Paul Gear
humbug at libertysys.com.au
Fri Jun 5 00:43:20 EDT 2015
On 05/06/15 14:41, Russell Stuart wrote:
> ...
>
> On Fri, 2015-06-05 at 14:16 +1000, mick wrote:
>> ...
>> 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
Or even "[a-zA-Z0-9:]*"
:-)
Paul
More information about the General
mailing list