Forum Discussion
Funfunfan
Mar 12, 2022Copper Contributor
SOLVED: Find and replace (using wildcards) text at the end of lines in tables
Hello,
I'm trying to replace useless text at the end of lines.
I found the solution for text outside tables - using ^13 to find relevant text at the end of lines:
([0-9])г.(^13)
and
([0-9]) г.(^13)
(it's this г. I want to remove)
I can't find a way to do the same thing with text in tables, as lines there don't end with paragraphs (^13) but with some strange sign (a cross between a circle and an x (see inserted picture below).
Is there a way to represent this sign in the find & replace dialog box?
Thank you.
9 Replies
Sort By
- If it is always a space followed by r and a period, use a normal find and replace to replace that with nothing.
- FunfunfanCopper Contributor
No. As I have shown, it's a letter followed by a dot, after the date [г. = y.(ear) in our language (Bulgarian)], therefore ([0-9])г.(^13) or ([0-9]) г.(^13)
depending on whether there is a space between the year and the г. or not.
Only I can't find a way to do it in tables, because lines there don't end with a paragraph, as explained in my question.And if I was to replace any г. with nothing, then I would lose the period sign when it happens to be at the end of sentences, which, obviously, I'm trying to avoid, hence г.(^13)
In the previous 2 steps of the replacement, I replace
([0-9])г. ([!А-Я])
([0-9]) г. ([!А-Я])
([0-9]) г.([!А-Я ^13])
with \1 \2
then
([0-9])г. ([А-Я])
([0-9]) г. ([А-Я])([0-9]) г.([А-Я])
with \1. \2
and finally
([0-9])г.(^13)
([0-9]) г.(^13)
with \1.\2
Thank you.- How about first using a Wildcard replace to replace
([0-9]{2,4})r.
with
\1 r.
to put a space before the r. if there isn't one. Then use an ordinary replace to replace a space followed by r and a period (.) with nothing.
I assume that it is unlikely that in ordinary text, you would have a sentence ending with a space followed by r and a period