Is there a way to add an "enter" as part of a replace command?
-
I have a wikitable that I’m compiling and I’ve got each row set as something like
|-|4 |Destroyer Kamikaze Class |37.5 |102.6 |9.1 |23.2 |2.9 |1398 |100
I’d like to replace each - sequence with a |
But I can’t seem to figure out how to format the replace
-
Hello @stephen-knapp and All,
So, if I understood you, clearly, you have lines like :
|-|4 |Destroyer Kamikaze Class |37.5 |102.6 |9.1 |23.2 |2.9 |1398 |100and you expect this resulting text :
|- |4 |Destroyer Kamikaze Class |37.5 |102.6 |9.1 |23.2 |2.9 |1398 |100Am I right about it ?
Best Regards
guy038
-
To answer the direct question, which was:
Is there a way to add an "enter" as part of a replace command?The answer is yes, use Regular Expression for the Search mode, and use the sequence
\r\nin the Replace with box, potentially along with other text. -
Hi, @stephen-knapp, @alan-kilborn and All,
If I presume that my guess was correct, here is the regex S/R :
-
SEARCH
^\|- -
REPLACE
$0\nin an Unix file OR$0\r\nin a Windows file -
Options
Wrap aroundandRegular expressionselected
Best Regards,
guy038
-
-
or: Extended
|-
|-\r\n
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login