FAQ  •  Login

Level 3

Moderators: UncleTimmy, mjpieters

Enjoying the challenge? Need a hint?
Make a donation and help keep the site running! -thesamet
<<

boris

Posts: 2

Joined: Mon Nov 03, 2008 2:31 pm

Post Mon Nov 03, 2008 2:38 pm

Wohoooooooo!

I made it! :)

If anyone needs a hint - look for xXXXaXXXx, not XXXaXXX! At least that was my mistake...

Oh, and thanks for the hints! Cya in the next challenges ;)
<<

boshnaq

Posts: 1

Joined: Tue Dec 02, 2008 10:42 pm

Post Tue Dec 02, 2008 10:46 pm

hello all,, the string when copied from the web pages source is in lines ,, and when i i paste it as is in python and try and run the string.search command it gives me an EOL error ,, i don't think i have to go and remove the breaks after each line of the string :S
<<

highrider

Posts: 3

Joined: Sat Jan 17, 2009 5:30 am

Post Tue Jan 20, 2009 3:20 am

Re: Wohoooooooo!

boris wrote:I made it! :)

If anyone needs a hint - look for xXXXaXXXx, not XXXaXXX! At least that was my mistake...

Oh, and thanks for the hints! Cya in the next challenges ;)


This hint seems to be what alot of people are missing. If you just search for XXXaXXX it will also match XXXaXXXXXXaXXX I'm assuming. Thanks boris.
<<

roboto

Posts: 3

Joined: Wed Jul 01, 2009 3:28 pm

Post Wed Jul 01, 2009 3:31 pm

When I print re.search('whatever_regex', string), I'm getting things like:
<_sre.SRE_Match object at 0x018AB6B0>

How am I supposed to find my sought-for string from that hex address? It seems like no one else has this problem...I'm assuming there is some simple solution, or I just don't know the correct way to do this.
<<

roboto

Posts: 3

Joined: Wed Jul 01, 2009 3:28 pm

Post Wed Jul 01, 2009 5:02 pm

roboto wrote:When I print re.search('whatever_regex', string), I'm getting things like:
<_sre.SRE_Match object at 0x018AB6B0>


Ah, nevermind...

If you call .group() on the re.search() it will print out the found string.
<<

fatway

Posts: 1

Joined: Tue Jul 07, 2009 9:31 pm

Post Wed Jul 08, 2009 2:52 am

ul0402206 wrote:I got 10 characters which look perfect. However, when I tried to http://www.pythonchallenge.com/pc/def/(word I got).html, just went to (myword.php) :x
Give the fist 6 characters: linked****
right or not?


I got the same with you...

and also return 'xxxxx.php'
<<

wearetherock

Posts: 4

Joined: Fri Aug 28, 2009 5:28 am

Post Fri Aug 28, 2009 6:41 am

I got 10 format, but not right i will go home to cry now
<<

wearetherock

Posts: 4

Joined: Fri Aug 28, 2009 5:28 am

Post Fri Aug 28, 2009 6:49 am

from 10 form, I found อิอิ
Hint : It's a meaningful word.
<<

ales85

Posts: 1

Joined: Wed Sep 23, 2009 11:25 am

Post Wed Sep 23, 2009 11:28 am

Ok fellows I have a question about re. What do I benefit from using re instead of simple comparison with if sentences? And one more thing. I really don't understand (must be blind or something :roll: , why do we have to search for xXXXaXXXx isntead of XXXaXXX? No matter how I turn it, I always find the only right way to be XXXaXXX, what am I missing here?

EDIT: ok just scratch the part of why re. It is simpler as I saw in examples but I still don't understand why xXXXaXXXx.
<<

justrajdeep

Posts: 1

Joined: Sun Sep 27, 2009 1:34 pm

Post Sun Sep 27, 2009 1:36 pm

people who are getting 400+ string as result you need to consider strings of this form [l][U][U][U][l][U][U][U][l]
<<

cyberjacob

Posts: 1

Joined: Wed Oct 14, 2009 7:24 am

Post Wed Oct 14, 2009 7:26 am

does anyone think that this would work

would this work?

  Code:
import re
string = "the code goes here"
m = re.search("[a-z][A-Z][A-Z][A-Z][a-z][A-Z][A-Z][A-Z][a-z]", string)
print(m)
<<

PixelHead777

Posts: 4

Joined: Fri Nov 13, 2009 7:09 am

Post Fri Nov 13, 2009 7:13 am

I got only 1 match...
I have the pattern to search for right.
I have tried both with and without the linebreak/newlines...
I'm not sure what I'm doing wrong...
if I do .group() I get one answer.
if I do .groups() I get '()'.
What could I be doing wrong???
Especially since everyone else who had trouble with RE got either 6 or 477 results, I only get one? *sigh*
Edit: Even better! That's fantastic, python, that's fan-friggin-tastic.
If I use {m} and eliminate the need to use the [a-z] at the beginning and end, I get a different single answer! Gaah!!!!
Edit 2:
OK, Item number 1.
{m} does NOT eliminate the need to use [a-z] at beginning and end.
Item number 2.
Do not use match, do not use search. Use findall. Findall is your friend.
Item number 2a
Your friend that likes to play practical jokes on you. I only found 7 matches... I have a reasonable word plus a letter... which means I'm six letters closer than I once was... but still 3 off....
Edit number 3:
... Wow do I feel stupid. I went back and recopied the mess? Got all ten. Go me!
<<

slamgo

Posts: 1

Joined: Thu Mar 04, 2010 2:10 am

Post Thu Mar 04, 2010 2:11 am

Level 3

confused...
<<

chuck

Posts: 1

Joined: Wed Mar 17, 2010 12:46 am

Post Wed Mar 17, 2010 12:50 am

Re: Level 3

This really drive me crazy!!!!!!!!!!
I know it means aAAAxAAAa and found 8 letters ,however 404 again
Isn't it like:
qIQNlQSLi
eOEKiVEYj
aZADnMCZq
.......
that can find 'lin.....'
??????????????
<<

Copernicus

Posts: 1

Joined: Fri Apr 02, 2010 2:59 am

Post Fri Apr 02, 2010 3:04 am

Re: Wohoooooooo!

boris wrote:I made it! :)

If anyone needs a hint - look for xXXXaXXXx, not XXXaXXX! At least that was my mistake...

Oh, and thanks for the hints! Cya in the next challenges ;)


Thanks for the hint, this was my mistake as well. Could have avoided so much time searching for solutions if this had been one of the hints on the page.
PreviousNext

Return to Python Challenge Hints

Who is online

Users browsing this forum: No registered users and 2 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.