Add Charater to everyline that begins with
-
I’m trying to add + to every line that begins with 31, skips if it’s not in the begining and skips if it already has a +
Example:
97898795433131 +319797831331 3146464646463to
97 89 87 95 31 +31 97 97 83 31 +31 46 46 46 31not
97 89 87 95 +31 ++31 97 97 83 +31 +31 46 46 46 +31thanks
-
Hello, @clyde-parker and All,
Not too difficult with regexes !
SEARCH
^(?=31)REPLACE
+-
This regex will search for beginning of current line , so the virtual zero-length location, but ONLY IF followed with the string
31 -
Then, in replacement, it will simply add the
+symbol at the very beginning of current line
Best regards,
guy038
-
-
works pretty good thank you sir!
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