I had to write a Java RegEx that would match words consisting of letters {a,b,c,d} that had the following quality:
#a + #c = #b + #d ,
where #a is the number of occurances of a in the word.
My knowledge of RegExes is not that deep, I can certainly write some simpler expressions, but here I had no idea. What do you think? Am I wrong for thinking this is too hard?
submitted by /u/Turatar
[link] [comments]
r/cscareerquestions I had to write a Java RegEx that would match words consisting of letters {a,b,c,d} that had the following quality: #a + #c = #b + #d , where #a is the number of occurances of a in the word. My knowledge of RegExes is not that deep, I can certainly write some simpler expressions, but here I had no idea. What do you think? Am I wrong for thinking this is too hard? submitted by /u/Turatar [link] [comments]
I had to write a Java RegEx that would match words consisting of letters {a,b,c,d} that had the following quality:
#a + #c = #b + #d ,
where #a is the number of occurances of a in the word.
My knowledge of RegExes is not that deep, I can certainly write some simpler expressions, but here I had no idea. What do you think? Am I wrong for thinking this is too hard?
submitted by /u/Turatar
[link] [comments]