SyntaxFix
Write A Post
Hire A Developer
Questions
final Pattern pattern = Pattern.compile("tag\\](.+?)\\[/tag"); final Matcher matcher = pattern.matcher("[tag]String I want to extract[/tag]"); matcher.find(); System.out.println(matcher.group(1));