I have a fun little task. I need to set a variable to true if:
string ends in a letter or the second digit in the string is either a “p” or “r”.
So far, I have
var endingIsLetter = Regex.(myString.length - 1) ??? magic here.
Any help? My regex buddy is on a dead laptop.
EDIT — REGEX is not required. I just thought it would be the easiest way to get this done. Any examples are welcome.
Why use Regex for that?