Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

imageboards

Name: Anonymous 2008-10-06 16:35

Hey EXPERT PROGRAMMERS
I want to make something that'll archive the imageboards I want. I know the text field is limited to 2000 characters, but what about the name/mail/subject ones? Oh, and how does it work with unicode characters?

Name: >>31 2008-10-07 18:58

>>30
I guess I'm still not understanding what you want. What are you getting the [9, 'e'] from? What exactly do you want it to return? It sounds like what you want is grouping, but I'm not sure.

>>> re.compile( 'a(.*?)b(.*?)c' ).findall( 'lakjlbjgcklfjaljgbkjgc' )
[('kjl', 'jg'), ('ljg', 'kjg')]

Name: >>31-32 2008-10-07 19:00

Oh, I see what you're getting at. You need to use groups in your regex. Here's a more succinct example with your strings --

>>> re.compile( "ab(.)c" ).findall( "jkf3ab9casabrtfdabecdf" )
['9', 'e']

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List