GREP and Question mark
Hi everyone
I needed a |GREP expression| to find any text between |symbols| and apply bold to it.
for example something to change the paragraph above in:
I needed a GREP expression to find any text between symbols and apply bold to it.
I found
\|(.+)\|
And it works well if the text between | symbols is in a single paragraph, but doesn't work if the text to be bolded contains more paragraphs.
For example, in te text:
Paragraph1.
|Paragraph2.
Paragraph3.|
Paragraph4.
The expression doesn't find
|Paragraph2.
Paragraph3.|
then I found a different expression that makes what I need.
\|([^?]+)\|
This expression finds text between | no matter how long and how many paragraphs it is.
Great! Problem solved...
But I just found it doesn't work if there's a question mark in the text.
Going back to the example above, it works on:
Paragraph1.
|Paragraph2.
Paragraph3.|
Paragraph4.
But it doesn't work on:
Paragraph1.
|Paragraph2?
Paragraph3.|
Paragraph4.
^? is supposed to find any character, I tested almost every possible symbol and punctuation. Just the ? stops the expression from working.
How can I solve this?
