We are trying to make a match on any text between a triplet of “s for example
“”” Some text here “””
We want to capture Some text here. This we have working alright, however, we have an issue when the text between the triplet of “s contains a forward slash /. So for example “”” This doesn/’t work “””, so if we have have;
“”” This doesn/’t work “””
“”” Some text here “””
Then the match goes and ignores the first “”” and goes on to match up to the second closing “”” so the match becomes;
This doesn/’t work Some text here
When all we want is This doesn/’t work. The regex I am using is as follows;
(?:"{3})([\p{Alnum}|\p{Punct}|\p{Space}]*)(?:"{3})
We are using capturing groups as a note.
Seems like problem with greedy/lazy quantifier. Change
*to*?for lazy matching.i.e.
(?:"{3})([\p{ALnum}|\p{Punct}|\p{Space}]*?)(?:"{3})