Copy link to clipboard
Copied
I need to delete text within and including the parenthesis in a generated ToC. I've tried usign GREP but it seems I cannot delete text - is that correct. Although I have been able to delete text one letter at a time
followign example: SIDE-ANGLE UTTHITA PARSVAKONASANA) [tab] 56 - I need to delete teh (UTTHITA PARSVAKONASANA) but leave the tab character and the page number so I cannot simple delete to end of line. I ahave tried various GREP expressions such as:
\(\d* which deletes only teh first (
\(.* which deletes everythign to teh end of teh line [includign tab and page number]
If I could only capture teh text - I could change it's color by applying a style and then replace everytihgn in that color
Try this to delete only the parenthesis...
Find: \((.+?)\)
Change: $1
Or this to delete the parenthesis and the text:
Find: \(.+?\)
Change: leave empty
Copy link to clipboard
Copied
Try this to delete only the parenthesis...
Find: \((.+?)\)
Change: $1
Or this to delete the parenthesis and the text:
Find: \(.+?\)
Change: leave empty
Copy link to clipboard
Copied
sorry - teh 2nd part of the answer worked like a charm - much easier than my solution
Copy link to clipboard
Copied
I need to delete text within and including the parenthesis
In that case, use the beginning of Jean-Claude's answer to find the parentheses and the text inside, but replace with nothing (leave the change field blank).
~Barb
Copy link to clipboard
Copied
I tried that - it did not change anything - however I did find a long workaround using combo of text and GREP
Text
1. repalced all ( with line break and ( "^n( "
2. repalced all ) with ) and end of paragraph ")^p"
GREP
3. \(.* & left change to blank
Text
4. repalce all linebreaks and end of paragraph with nothing [left change blank] "^n^p"