This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Select objects in JOSM whose values contain a fragment of word

0

I want to select all objects that have the word some in its value. The key is roof:material.

I tried "roof:material"=some* and checked the regexp box. It does not find match. The existing values are some parts CGI, some RCC, some RCC some tiles etc.

asked 25 Aug '13, 10:07

amritkarma's gravatar image

amritkarma
684212941
accept rate: 11%


One Answer:

4

The search function key:valuefragment is what you are looking for (described in the find window). No RegExp needed.

Your key contains the ":" which is a problem here as JOSM uses it as a special character in the search syntax.

  • Use this: roof\:material:some (you can escape it with the "\" (like in RegExps)).
  • Or use this: "roof:material":some (the enclosing in doublequotes disables the special meaning of the ":" - see the last but one entry in the search examples).

answered 25 Aug '13, 11:53

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554
accept rate: 18%

edited 25 Aug '13, 12:00

2

Also note, if you do need to use a regexp, that the syntax is different and "some*" does not match what you think, but "som", "some", "somee", "someee", etc. See https://en.wikipedia.org/wiki/Regular_expression Regexps are more powerful but alo more complicated.

(26 Aug '13, 00:32) Vincent de P... ♦

Source code available on GitHub .