#17415 closed enhancement (invalid)
JOSM negated regular expression match, question.
Reported by: | Allroads | Owned by: | Allroads |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core mappaint | Version: | |
Keywords: | Cc: |
Description (last modified by )
When I use a code:
[highway][lanes][lanes!~/1|2|3|4|5|6|7/]::highway_lanes_layer
to exclude: negated Regular expression match, all others should get a "else" icon Then I have a lanes=10 on a way. This 10 should get a "else" icon, This icon is not showing, because 10 has number 1 in 10, the program can not choose. If I have lanes=8 or lanes=9, I get the "else" icon.
What am I doing wrong?
Attachments (1)
Change History (12)
by , 6 years ago
Attachment: | lanes negated.JPG added |
---|
comment:1 by , 6 years ago
Description: | modified (diff) |
---|
comment:2 by , 6 years ago
Description: | modified (diff) |
---|
comment:3 by , 6 years ago
Owner: | changed from | to
---|---|
Status: | new → needinfo |
comment:4 by , 6 years ago
I tried that, before.
way|z18-19["highway"]["lanes"][lanes!~/^1|2|3|4|5|6|7$/]::highway_lanes_layer
this did not work for 10.
THIS WORKS !
way|z18-19["highway"]["lanes"][lanes!~/^1$|^2$|^3$|^4$|^5$|^6$|^7$/]::highway_lanes_layer
Thanks for pushing me to do the most comprehensive method.
Now I have to redo the smoothness category too, I think, horrible in [smoothness!~/horrible|very_horrible/
in [smoothness!~/^horrible$|^very_horrible$/
When someone write terrible_horrible, it should give also "else" icon, seeing there is maybe a mistake or different writing. If /horrible/
is there, it negate terrible_horrible too, what is then not correct.
follow-up: 7 comment:5 by , 6 years ago
Ah, grouping brackets were missing. Try this: [lanes!~/^(1|2|3|4|5|6|7)$/]
comment:7 by , 6 years ago
Replying to Klumbumbus:
Ah, grouping brackets were missing. Try this:
[lanes!~/^(1|2|3|4|5|6|7)$/]
This works!
way|z18-19["highway"]["lanes"][lanes!~/^(1|2|3|4|5|6|7)$/]::highway_lanes_layer
Thanks.
comment:8 by , 6 years ago
Resolution: | → invalid |
---|---|
Status: | needinfo → closed |
comment:9 by , 6 years ago
way|z18-["highway"]["surface"="metal"]::highway_surface_layer { repeat-image: highway-surface-metal.svg; /* Last surface tag Else.*/ way|z18-["highway"]["surface"][surface!~/^(asphalt|cobblestone|compacted|concrete|concrete:lanes|concrete:plates|dirt|earth|fine_gravel|grass|grass_paver|gravel|gravel_turf|ground|ice|metal|mud|paved|paving_stones|pebblestone|salt|sand|sett|snow|unhewn_cobblestone|unpaved|wood|woodchips$)/]::highway_surface_layer { repeat-image: highway-surface-else.svg; }
I noticed today that surface=metal_grid did not give a else image. It should.
When I use instead grid_metal it gives a else image.
Both should get else image.
^
and$
mark the beginning and ending of a regexp match. Change[lanes!~/1|2|3|4|5|6|7/]
to[lanes!~/^1|2|3|4|5|6|7$/]
and it should work.