0

I have the following piece of regex which works in an online regex tester:

  assetName">([^"]+)</span>

I want to use this in a Beanshell Script like this:

  Pattern p = Pattern.compile("assetName">([^"]+)</span>");

How do I handle the double quotes here? Thanks

nhahtdh
  • 54,546
  • 15
  • 119
  • 154
ratsstack
  • 983
  • 1
  • 11
  • 30

1 Answers1

5

As in Java, just use a slash in front of the double quotation mark:

Pattern p = Pattern.compile("assetName\">([^\"]+)</span>");
Wiktor Stribiżew
  • 561,645
  • 34
  • 376
  • 476