Comment on: I suck at regex... Can someone please explain why only example C is working here?
0 11 Jul 2019 09:43 u/folgeyharry in v/programmingComment on: I suck at regex... Can someone please explain why only example C is working here?
put a * after [a-zA-Z], otherwise you're only going to match 1 character strings
I tried all 3 using mono on linux and they all worked fine. Also, why use regex at all? You can just compare x to 'a', etc. I included a 4th example in the pastebin showing the complete program.
https://pastebin.com/k1HQR5hu