Search found 3 matches

by ak1pper
17 Apr 2024 10:47
Forum: Tips & Tricks, Questions & Answers
Topic: How to replace last two characters?
Replies: 4
Views: 294

Re: How to replace last two characters?

Great, this is what I meant.

Thank you very much for your time.
by ak1pper
17 Apr 2024 08:21
Forum: Tips & Tricks, Questions & Answers
Topic: How to replace last two characters?
Replies: 4
Views: 294

Re: How to replace last two characters?

$old = "Z8264519300.psd"; $new = regexreplace($old, "(.*?)(\d{2})(\.[^.]+?)$", "$1" . "99" . "$3"); // $new = "Z8264519399.psd" // --- $old = "Z8264519300.psd"; $new = regexreplace($old, "^(.{2})(.*?)$", "P7" ...
by ak1pper
17 Apr 2024 07:58
Forum: Tips & Tricks, Questions & Answers
Topic: How to replace last two characters?
Replies: 4
Views: 294

How to replace last two characters?

Good morning! I'm new here, and although I've been able to get by on my own so far, there's something that's resisting me. Using RegExp, how can I replace the last two characters of a file as well as the first two? I give an example: Original: Z82645193 00 .psd How I want it to look: Z82645193 99 .p...