NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I need some info how to use "regular expression" here. JOSM site is lacking help on this topic. For example what to enter in the search box to look for names starting with a particular string.

asked 01 Dec '15, 08:51

Plamen's gravatar image

Plamen
1516713
accept rate: 0%

edited 01 Dec '15, 10:43


First, you have to enable expert mode. Then just open the search tool and enable regular expression. Now you can enter regular expressions enclosed in quotes, like "^Park" for selecting any "Park Avenue", "Park Lane" and so on. According to this page JOSM uses Java Regex.

permanent link

answered 01 Dec '15, 11:47

scai's gravatar image

scai ♦
33.3k21309459
accept rate: 23%

edited 01 Dec '15, 12:14

Thanks, name:"^Park" is OK, but also return name:en=Park when name=Something_else. Is it possible name:en:"^Park"?

(01 Dec '15, 13:03) Plamen
1

Oh, that's interesting. "name"="value" doesn't seem to work when using regular expressions for value. This could be a bug. However "^name$":"^Park" seems to perform an exact match and ignores keys with name:en, disused:name (bad example) and so on.

(01 Dec '15, 13:25) scai ♦

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×622
×193
×6

question asked: 01 Dec '15, 08:51

question was seen: 5,299 times

last updated: 01 Dec '15, 13:29

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum