L
L
Leo Leonov2020-06-12 12:58:45
Regular Expressions
Leo Leonov, 2020-06-12 12:58:45

How to remove the last characters of a string?

Good afternoon, I can’t catch up with how to delete exactly the last two from a string with a random number of characters. They are always static, but often appear throughout the line. It is necessary to remove the last two. How to do it with a regular expression?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stalker_RED, 2020-06-12
@Leo77777

(.+)(.{2})
https://regex101.com/r/Akbua1/1/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question