Modify this regex: {([^ \]] *)} to accept \]
I have this regex:
{([^\]]*)} // any character except ']' but i want it to accept also '\]' this combination of 2chars
Example
'Lorem Ipsum is simply] dummy text' should return => 'Lorem Ipsum is simply' (and this ones does) but
'Lorem Ipsum is simply\] dummy text' => should return all the text because the ']' is escaped
hope it makes sense
+3
source to share
2 answers