Page 1 of 1

[Challenge] - Regex

Posted: Thu Dec 17, 2009 10:48 am
by klevis miho
Perform a regex on this text:
- newsletter
- good news letter
- NEWS 1
- letter (number on. 599)
- NE 1 K.A.R. - 777
- the first things (number on. 760) - 777
- things happen 6 - 777 - 778
- room - is anyone there - to get things going
- walk of life - preventing marry - showing more than got - 777
- preliminaryt status - bud & spencer: the returning (page on. 528) - 777 - 778

The output should be:
newsletter
good news letter
NEWS 1
letter
NE 1 K.A.R.
the first things
things happen 6
room - is anyone there - to get things going
walk of life - preventing marry - showing more than got
preliminaryt status - bud & spencer: the returning

:D

Re: [Challenge] - Regex

Posted: Thu Dec 17, 2009 10:26 pm
by josh
1) you write this as a challenge but dont elaborate, or even quantify what it is we are being challenged on, other then to simply do your homework
2) you dont provide any additional information about the significance of the "1" vs the insignificance of matching the "6", should it just not match any "1"s? Or is it because that number is odd? etc... So even if someone was to take the "challenge" you wrote a spec that sets our pattern up for failure.

Another one of your exciting "challanges" - viewtopic.php?f=1&t=105200

Sounds fun. Doing stuff for you while you cheekishly refuse to acknowledge it, just how I want to spend my weekend :D . This doesn't seem like a "challenge" or "puzzle" at all.

Since it is not clear what a continuation of your "pattern" would look like, any potential solution would just be a mechanical altering of your original pattern, granted it does take some knowledge of regex to complete I think there should be some wit involved, maybe you could do that by posting the "rules" of your pattern and see who can come up with the shortest solution ( anyone could simply copy and paste each one of those lines and simply black or white list it respectively)

Re: [Challenge] - Regex

Posted: Fri Dec 18, 2009 2:45 am
by klevis miho
I don't know what you mean, maybe my english isn't good.
I simply do what a regular expression on this text to display the desired output.

Re: [Challenge] - Regex

Posted: Sat Dec 19, 2009 12:11 am
by josh
klevis miho wrote:I simply do what a regular expression on this text to display the desired output.
Exactly. we are not your personal work force.