How can I replace all lines with given text?
-
I want a regex to do this and that text that needs replacing might start or end with punctuation.
-
It is good to want things.
However, if you don’t put more effort into your description, you might not be on the receiving end of any advice. -
To replace an entire line, you will want to combine the regex concepts for “anchor to beginning of line” with “match 0 or more of any character” then “anchor to end of line”. The Online User Manual Searching/Regex section linked below will help you quickly find those concepts" (search for “anchor” and “any character” and “0 or more”)
The replacement is just the text you want it to be replaced with.
-—
Useful References
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