John Salerno wrote:
> [EMAIL PROTECTED] wrote:
>> hi
>>
>> if i have a some lines like this
>> a ) "here is first string"
>> b ) "here is string2"
>> c ) "here is string3"
>>
>> When i specify i only want to print the lines that contains "string" ie
> ...
> And I'm actually ashamed to admit that I
Le Mardi 13 Juin 2006 15:59, John Salerno a écrit :
> And I'm actually ashamed to admit that I know the RE way, but not the
> regular string manipulation way, if there is one!
eheh,
In [39]: import string
In [40]: sub, s1, s2 = 'string', 're string2, ,string1', 're string2, ,string'
In [41]: su
[EMAIL PROTECTED] wrote:
> hi
>
> if i have a some lines like this
> a ) "here is first string"
> b ) "here is string2"
> c ) "here is string3"
>
> When i specify i only want to print the lines that contains "string" ie
> the first line and not the others. If i use re module, how to compile
> the
John Salerno wrote:
> [EMAIL PROTECTED] wrote:
>
> > just curious , if RE has the \b and it works, can we look into the
> > source of re and see how its done for \b ?
>
> I had a look in the sre module (which re seems to import), but I
> couldn't find much. I'm not the best at analyzing source cod
[EMAIL PROTECTED] wrote:
> just curious , if RE has the \b and it works, can we look into the
> source of re and see how its done for \b ?
I had a look in the sre module (which re seems to import), but I
couldn't find much. I'm not the best at analyzing source code, though. :)
What is it you wa
John Salerno wrote:
> [EMAIL PROTECTED] wrote:
> > hi
> >
> > if i have a some lines like this
> > a ) "here is first string"
> > b ) "here is string2"
> > c ) "here is string3"
> >
> > When i specify i only want to print the lines that contains "string" ie
> > the first line and not the others.
John Salerno wrote:
> [EMAIL PROTECTED] wrote:
> > hi
> >
> > if i have a some lines like this
> > a ) "here is first string"
> > b ) "here is string2"
> > c ) "here is string3"
> >
> > When i specify i only want to print the lines that contains "string" ie
> > the first line and not the others.
> When i specify i only want to print the lines that contains "string" ie
> the first line and not the others. If i use re module, how to compile
> the expression to do this? I tried the re module and using simple
> search() and everytime it gives me all the 3 lines that have "string"
> in it, wher
John Salerno wrote:
> [EMAIL PROTECTED] wrote:
> > hi
> >
> > if i have a some lines like this
> > a ) "here is first string"
> > b ) "here is string2"
> > c ) "here is string3"
> >
> > When i specify i only want to print the lines that contains "string" ie
> > the first line and not the others.
[EMAIL PROTECTED] wrote:
> hi
>
> if i have a some lines like this
> a ) "here is first string"
> b ) "here is string2"
> c ) "here is string3"
>
> When i specify i only want to print the lines that contains "string" ie
> the first line and not the others. If i use re module, how to compile
> th
hi
if i have a some lines like this
a ) "here is first string"
b ) "here is string2"
c ) "here is string3"
When i specify i only want to print the lines that contains "string" ie
the first line and not the others. If i use re module, how to compile
the expression to do this? I tried the re modul
11 matches
Mail list logo