﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
17751	error with custom mapcss using regex	francians	team	"Hello,

I'm building my own validation based on regex and mapcss.
Many thanks for the help

Francesco

==== What steps will reproduce the problem?

1. Generate a mapcss file with this rule:

*[amenity=vending_machine][vending!~/(admission_tickets|animal_feed|art|bicycle_tube|books|bottle_return|bread|candles|chemist|chewing_gums|cigarettes|coffee|condoms|drinks|electronics|elongated_coin|excrement_bags|feminine_hygiene|first_aid|fishing_bait|fishing_tackle|flowers|food|fuel|ice_cream|ice_cubes|ink_cartridges|laundry_detergent|lottery|milk|newspapers|parcel_mail_in|parcel_pickup|parking_tickets|public_transport_plans|public_transport_tickets|sex_toys|SIM_cards|stamps|sweets|syringes|telephone_vouchers|toll|toys|umbrellas|water)(?:$|[;](?R))/] {
	throwWarning: tr(""unusual value of {0}"", ""{0.value}"");
	group: ""MapThisWay"";
}

2. import it in josm
3. validate


==== What is the expected result?

to give warning when one value is unknown

==== What happens instead?

in console I have a lot of:

2019-05-23 21:20:52.475 GRAVE: Skipping to the next rule, because of an error:
2019-05-23 21:20:52.475 GRAVE: org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSException: Error at line 114, column 560: java.util.regex.PatternSyntaxException: Unknown inline modifier near index 518
(admission_tickets|animal_feed|art|bicycle_tube|books|bottle_return|bread|candles|chemist|chewing_gums|cigarettes|coffee|condoms|drinks|electronics|elongated_coin|excrement_bags|feminine_hygiene|first_aid|fishing_bait|fishing_tackle|flowers|food|fuel|ice_cream|ice_cubes|ink_cartridges|laundry_detergent|lottery|milk|newspapers|parcel_mail_in|parcel_pickup|parking_tickets|public_transport_plans|public_transport_tickets|sex_toys|SIM_cards|stamps|sweets|syringes|telephone_vouchers|toll|toys|umbrellas|water)(?:$|[;](?R))
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ^. Causa: java.util.regex.PatternSyntaxException: Unknown inline modifier near index 518


==== Please provide any additional information below. Attach a screenshot if possible.

{{{
URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2019-04-28 04:36:41 +0200 (Sun, 28 Apr 2019)
Build-Date:2019-04-28 02:37:58
Revision:15031
Relative:URL: ^/trunk

Identification: JOSM/1.5 (15031 it) Linux Antergos Linux
Memory Usage: 1337 MB / 3541 MB (622 MB allocated, but free)
Java version: 1.8.0_181-b13, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: :0.0 1920x1080
Maximum Screen Size: 1920x1080
Dataset consistency test: No problems found

Plugins:
+ OpeningHoursEditor (34977)
+ PicLayer (34908)
+ buildings_tools (34982)
+ turnrestrictions (34977)
+ utilsplugin2 (34977)

Tagging presets:
+ ${HOME}/JOSM/miopreset.xml

Validator rules:
+ https://josm.openstreetmap.de/josmfile?page=Rules/SuspiciousSwimming_Pool&zip=1
+ ${HOME}/JOSM/MyRules.validator.mapcss

Last errors/warnings:
- W: No configuration settings found.  Using hardcoded default values for all pools.
- E: org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSException: java.util.regex.PatternSyntaxException: Unknown inline modifier near index 518
- E: Skipping to the next rule, because of an error:
- E: org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSException: Error at line 114, column 560: java.util.regex.PatternSyntaxException: Unknown inline modifier near index 518
}}}
"	defect	new	normal		Core			template_report	
