Modify

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#9783 closed defect (fixed)

Not matching parentheses in regex

Reported by: naoliv Owned by: team
Priority: normal Milestone: 14.05
Component: Core validator Version:
Keywords: mapcss Cc:

Description

http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html#bs says that to match something having a parentheses we need to double escape it.

Using this rule

*[name =~ /\\(foo\\)/] {
        throwWarning: tr("foo");
}

and something with name=(foo) doesn't match anything, however.
No error is displayed on console (so it seems to be parsed correctly).

Attachments (0)

Change History (3)

comment:1 Changed 9 years ago by Don-vip

Keywords: mapcss added

comment:2 Changed 9 years ago by simon04

Resolution: fixed
Status: newclosed

In 7115/josm:

fix #9783 - MapCSS: allow to regexp-match name=(foo) by [name =~ /\(foo\)/]

comment:3 Changed 9 years ago by simon04

Milestone: 14.05

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.