bruce writes:
> hi.
>
> thanks for the reply.
>
> tried what you suggested. what I see now, is that I print out the
> lines, but not the regex data at all. my initial try, gave me the
> line, and then the next items , followed by the next line, etc...
exp = re.compile(r"(#\d+\s*/\s*\d+#\d+#)")
hi.
thanks for the reply.
tried what you suggested. what I see now, is that I print out the
lines, but not the regex data at all. my initial try, gave me the
line, and then the next items , followed by the next line, etc...
what I then tried, was to do a capture/findall of the regex, and
combine
On 07/11/2013 17:45, bruce wrote:
update...
dat=re.compile("#(\d+) / (\d+)#(\d+)#").split(s)
almost works..
except i get
m = 10116#000#C S#S#100##001##DAY#Fund of Computing#Barrett,
William#3#MWF#08:00am#08:50am#3718 HBLL
m = 45
m = 58
m = 0
m = 10116#000#C S#S#100##002##DAY#Fund of Computi
update...
dat=re.compile("#(\d+) / (\d+)#(\d+)#").split(s)
almost works..
except i get
m = 10116#000#C S#S#100##001##DAY#Fund of Computing#Barrett,
William#3#MWF#08:00am#08:50am#3718 HBLL
m = 45
m = 58
m = 0
m = 10116#000#C S#S#100##002##DAY#Fund of Computing#Barrett,
William#3#MWF#09:00am#09:
hi.
got a test file with the sample content listed below:
the content is one long string, and needs to be split into separate lines
I'm thinking the pattern to split on should be a kind of regex like::
#45 / 58#0#
or
#9 / 58#0
but i have no idea how to make this happen!!
if i read the content i