Regex help
-
How can I put backticks around every line with words as well as end the lines with two spaces?
On Reddit.com, using markdown, code must be between two backticks and lines can be separated by adding two spaces at of the end.
-
Try:
“. matches newline” unchecked
find what:^.*\w.*$
replace with:\`$0\`<=== 2 spaces after 2nd backtick -
Note that in this scenario, leaving the
$(end of line assertion) works just as well:find what:
^.*\w.* -
@Alan-Kilborn said in Regex help:
leaving the $
Hmm, for maximum clarity I should have said:
…leaving off the
$…
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