Simple replace / to hard for me
-
Hi, can anyone please help me with this simple problem?
in a file I need to search for numbers like this:
*1234567890
the numbers are always changing, but I need to get the Asterisk (*) removed.
the replacement dosen’t need to be the same number, just the Asterisk need to be removed.
so from this: *1234567890
to this : 0000000000would be fine!
Thanks if anyone can help!
Regards, Sascha
-
Hello @Sascha-Holliger,
in replace dialog check regular expression.
Find what:\*(\d+) Replace with:\1as * is a known char in regex we need to escape with \
(\d+) = this matches any size of numbers and get stored in \1Cheers
Claudia -
Thanks, but it should only replace numbers with 10 digits… there are a lot of numbers in that file, only if the number has a leading * and is followed by 10 digits it should be replaced.
-
In find what replace the + with {10}
\*(\d{10})Cheers
Claudia -
worked! Thanks Claudia!
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