Hello everyone,
I have a program that needs to find straights in a hand of cards. The hand
is a string with no whitespace sorted by the cards' ranks, eg "9d10cJhQsKd".
How can I identify if that hand contains a straight with a single regex? Is
that even possible?
Is there a way to escape the regex and do addition on a backreference to get
something like /(\d+)[cdhs]\1+1[cdhs]\1+2/?
Thanks,
-Andrew

Reply via email to