How to extract a string regular expression using java?

This question already has an answer here:

  • How do you access the matched groups in a JavaScript regular expression? 14 answers

  • You should use lazy quantifier ? and capture group () like this.

    Regex: ${(.*?)}

    Replacement to do: 1 for first captured group.

    Regex101 Demo

    链接地址: http://www.djcxy.com/p/76810.html

    上一篇: 修改一个正则表达式,只有[a

    下一篇: 如何提取使用java的字符串正则表达式?