May-06-2018, 04:45 PM
Hi,
I am pretty new with regex, i am trying to write a pattern that would check if there is a an odd number of specific characters within a string. I want to get true if i just have g,h or i r in a string and if i have odd number of g and h ( the sum of both of the occurences). Everything i try fails...What would be the best approach for that kind of issue?
Thank you
Regards,
Othniel
I am pretty new with regex, i am trying to write a pattern that would check if there is a an odd number of specific characters within a string. I want to get true if i just have g,h or i r in a string and if i have odd number of g and h ( the sum of both of the occurences). Everything i try fails...What would be the best approach for that kind of issue?
Thank you
Regards,
Othniel