Modify

Opened 10 years ago

Closed 10 years ago

Last modified 10 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 by Don-vip, 10 years ago

Keywords: mapcss added

comment:2 by simon04, 10 years ago

Resolution: fixed
Status: newclosed

In 7115/josm:

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

comment:3 by simon04, 10 years ago

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. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.