Copy link to clipboard
Copied
This should be fairly simple but my grep knowledge is pretty simple. Want to find chapter numbers that have a dash before and after the number and remove the dashes but leave the number. So for example, the word doc I imported has a chapter number of -11- and I want it to be just 11. I can find it using the grep expression -\d\d- but can't figure out how to get rid of the dashes. The number is also set up as a paragraph style.
Thanks to anyone who can help.
Find: -(\d+)-
Replace by: $1
Copy link to clipboard
Copied
Find: -(\d+)-
Replace by: $1
Copy link to clipboard
Copied
Thanks Michel
So just so I learn does the plus after d represent more digits?
Copy link to clipboard
Copied
So one more. Have some paragraphs that have a single space before them. If I try to use the built in query to remove leading space, it grabs a hard return that is in the line before the paragraph as well as the single space. How do I prevent that?