Replace specific number and letter
-
Hello
‘Blue1’: ‘0010001000100011’,
‘Orange1’: ‘1000100010001000’
I want to replace number 1 with letter a but I don’t want to change Blue1 and Orange1 text.
If I use
Find: \d(‘1)
Replace: a
the first number ‘1 and the last number 1’ doesn’t change because there is this symbol (’)… Any solution…? Thanks -
Hello @alexandros-xatzidimitriou, and All,
Do you mean this kind of replacement ? :
- Initial text :
'Blue1': '0010001000100011', 'Orange1': '1000100010001000'-
SEARCH
1(?!':) -
REPLACE
a -
Final text :
'Blue1': '00a000a000a000aa', 'Orange1': 'a000a000a000a000'
Notes :
-
The search regex looks for a
1digit, ONLY IF NOT followed with the string':and replaces it with the lowercase lettera -
The
(?!.......)syntax is a negative look-ahead structure
Best Regards,
guy038
-
Thanks a lot guy038! This is exactly what I was looking for!!!
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