I have strings such as:
this is a text ( with parts in brackets ) . This is another string ( with a very long string between brackets that should not be removed because it is too long being over 100 characters )
Desired output:
this is a text . This is another string ( with a very long string between brackets that should not be removed because it is too long being over 100 characters )
I can match the bracket content with (with the goal to replace it with an empty string to remove it).
\s\(.+\)\s
Now, if there is no closing bracket, the regex deletes to much text. I would like to delete content between two brackets, but only if the length is < 100 chars. How an I do this with regex? I understand I would need a lookahead expression? I appreciate the help!
Edit: Using the following expression, as suggested doesn't work as solution:
\s\(.+\){1,100}\s