Link to home
Start Free TrialLog in
Avatar of Dallas Smetter
Dallas SmetterFlag for United States of America

asked on

Regex: show the last n characters of a string

I have 36 characters strings, and I need to find out how to use a regex to just show the last 4 characters, whatever they may be.

Thank you in advance!
ASKER CERTIFIED SOLUTION
Avatar of Dan Craciun
Dan Craciun
Flag of Romania image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Dallas Smetter

ASKER

Dan, yes I would just write the normal code but... in this particular instance, it's a front end management GUI that only accepts a regex as a parameter. I don't have access to the backend on this baby. Thanks!
Another solution:

(....)$

simple as it is.
Wish I could give some points to Surrano.
You can.
Click on "Request attention" and ask a mod to reopen the question.
Then you can redistribute the points as you see fit.

HTH,
Dan
Step one has been performed.
C'mon I already saw that the question was closed before I answered. No need to redistribute points. Really.
Suit yourself, I was just trying to do what I thought was right. Damned if you do, damned if you don't...
Not damned... You just embarrass me :-)