Trying to search bbcode-style tags with regular expression:
For example, I needed [user=1]John Dow[/user]
with regular: [[user=[0-9]+].*?[/user]]
But couldn't receive needed result.
Trying to search bbcode-style tags with regular expression:
For example, I needed [user=1]John Dow[/user]
with regular: [[user=[0-9]+].*?[/user]]
But couldn't receive needed result.
Remove the outer pair of brackets and escape the literal brackets (unlike the range-of-characters brackets)
let pattern = "\\[user=[0-9]+\\].*?\\[/user\\]"