How do I replace characters in the middle of a string?
-
How do I replace a character/a group of characters in each line? For example:
https://www.example.com/images/asdfuisdhfaskehtiohgs_50.png
https://www.example.com/images/sdfjksaldfjalsjdkdddd_20.jpg
https://www.example.com/images/shgrfjkcviofreavcdfsd_600.jpg
https://www.example.com/images/disolkhrewiousdfuoidd_400.pngI want it replace it with:
https://www.example.com/images/asdfuisdhfaskehtiohgs_1280.png
https://www.example.com/images/sdfjksaldfjalsjdkdddd_1280.jpg
https://www.example.com/images/shgrfjkcviofreavcdfsd_1280.jpg
https://www.example.com/images/disolkhrewiousdfuoidd_1280.pngI want to replace any amount of digits without replacing β_β and anything before it and I do not want to overwrite anything after the dot β.β. I want to replace something in between it (the numbers).
And I do not know how to use the regular expressions for replacing something that is next to a character I do not want to replace.
-
Solved, realized how the brackets work, the solution is this: [_].*?[.]. Sorry!
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