Re: Regular expression that skips single line comments?

2009-01-19 Thread martinjamesevans
Firstly, a huge thanks to all for the solutions! Just what I was looking for. > (Aside: why are you doing a case-insensitive match for a non-letter? Are > there different upper- and lower-case dollar signs?) As you can probably imagine, I had simplified the problem slightly, the language uses

Regular expression that skips single line comments?

2009-01-19 Thread martinjamesevans
I am trying to parse a set of files that have a simple syntax using RE. I'm interested in counting '$' expansions in the files, with one minor consideration. A line becomes a comment if the first non-white space character is a semicolon. e.g. tests 1 and 2 should be ignored sInput = """ ; $1 tes

Re: EBCDIC <--> ASCII

2008-12-08 Thread martinjamesevans
On Dec 5, 2:13 pm, Michael Ströder <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > On Dec 4, 4:45 pm, Michael Ströder <[EMAIL PROTECTED]> wrote: > >> [EMAIL PROTECTED] wrote: > >>> I'm having a problem trying to use the codecs package to aid me in > >>> converting some bytes from EBCDIC i

EBCDIC <--> ASCII

2008-12-04 Thread martinjamesevans
I'm having a problem trying to use the codecs package to aid me in converting some bytes from EBCDIC into ASCII. I have some 8bit text that is in mixed format. I extract the bytes that are coded for EBCDIC and would like to display them correctly. The bytes that are EBCDIC could values 0-255, I'm