Invalid Escape sequence java -


this question has answer here:

i trying keeps give me error invalid escape format. trying remove backslash didn't work

private string chars = "(lp+" (\\w+)/\\d{3} \\d+ \\w+ \\s+\\s?\"?($|-|[\\w\\\\\.@]+)\"?")"; 

  • string should have capital 's'
  • you've missed esacaping couple of quotation marks.
  • you have run of 5 backslashes, should either 4 or 6.

you probably want instead...

private string chars = "(lp+\" (\\w+)/\\d{3} \\d+ \\w+ \\s+\\s?\"?($|-|[\\w\\\\\\.@]+)\"?\")"; 

Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

android - CollapsingToolbarLayout: position the ExpandedText programmatically -

Listeners to visualise results of load test in JMeter -