News for hackers. Stuff that matters.
Re:Learn Regex The Hard Way by leeoniya on Saturday February 25, 2012 @02:03PM (#3633568)
i'm not sure why you insist i have no solution or cannot admit that i am wrong, when i have outlined exactly what the solution is.

i would be more than happy to send a patch if i wasn't 100% sure that it would be rejected or ignored on the stated grounds. these convos along with the only 2 outstanding, uncommented, unmerged, 3.5-month-old merge requests have not exactly instilled a great vote of confidence that you are open to taking people's code or advice.

i will leave you with this - after reading through your alteration section (and perhaps the whole book), beginning regex students will be unable to correctly answer the following question (using your own example) which appears not to use any concepts not previously discussed:

Circle all strings below which will be matched by ^[0-9]+|[a-z]+$

a. abc

b. 123

c. abc123

d. 123abc

e. abc_45&{`!123

f. 123_xk&{`!abc

g. _xk&{`!abc

h. 123_xk&{`!

if you believe this is some edge-case gotcha and as a teacher, you're okay with this, that's fine with me, i've spent an order of magnitude more energy than i should have trying to help.

Re:Learn Regex The Hard Way by lninyo on Saturday February 25, 2012 @05:22PM (#3634022)
Just out of sheer curiosity, what regexp tutorial would YOU recommend?
Re:Learn Regex The Hard Way by leeoniya on Sunday February 26, 2012 @12:25AM (#3634905)
it depends on where you're coming from. if you've never touched programming, regular expressions is probably not a good place to start in general. otherwise this one is top-notch:

http://www.regular-expressions.info/tutorialcnt.html