﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
22096	regexp_match() in validator.mapcss should allow placeholders	andygol	team	"Related to #17669
==== What steps will reproduce the problem?
{{{
#!mapcss
/* Excessive "";"" symbol at the end of the value */
*[/(phone|fax)/][/(phone|fax)/ =~ /^(.+); *$/] {
    throwWarning: tr(""{0}"", ""{0.value}"");
    group: tr(""Empty value after \"";\"""");
    fixAdd: concat(""{0.key}="", get(regexp_match(""^(.+); *$"", ""{0.value}""), 1));
}
}}}

run this rule against POI with `contact:phone=+380 4594 57 441;+380 4594 57 442;` or `fax=+380 4594 57 441;` or similar tags

==== What is the expected result?
Value without trailing `;` symbol
- `contact:phone=+380 4594 57 441;+380 4594 57 442`
- `fax=+380 4594 57 441`

==== What happens instead?
Tested tag disappears as `regexp_match()` with placeholder `""{0.value}""` returns null. 

This behaviour is very similar to the case of using `tag(""{0.key}"")`, if we use placeholder instead of explicit key

==== Please provide any additional information below. Attach a screenshot if possible.

{{{
Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2022-04-04 22:26:00 +0200 (Mon, 04 Apr 2022)
Revision:18427
Build-Date:2022-04-05 01:30:55
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (18427 uk) Mac OS X 12.4
OS Build number: macOS 12.4 (21F79)
Memory Usage: 508 MB / 8192 MB (280 MB allocated, but free)
Java version: 18+36-2087, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Look and Feel: com.apple.laf.AquaLookAndFeel
Screen: Display 1 1512×982 (scaling 2.00×2.00)
Maximum Screen Size: 1512×982
Best cursor sizes: 16×16→16×16, 32×32→32×32
System property file.encoding: UTF-8
System property sun.jnu.encoding: UTF-8
Locale info: uk_UA
Numbers with default locale: 1234567890 -> 1234567890
Program arguments: [--debug]
Dataset consistency test: No problems found
}}}
"	defect	closed	normal		Core validator		fixed	placeholder,mapcss,validator	
