I have it now. Had to beat my head over it a couple times. Thanks
everybody.
--
http://mail.python.org/mailman/listinfo/python-list
On Aug 9, 9:18 am, genxtech wrote:
> On Aug 8, 7:34 pm, Tim Chase wrote:
>
>
>
> > On 08/08/10 17:20, genxtech wrote:
>
> > > if re.search(search_string, in_string) != None:
>
> > While the other responses have addressed some of the big issues,
> > it's also good to use
>
> > if thing_to_test
genxtech wrote:
On Aug 8, 7:34 pm, Tim Chase wrote:
On 08/08/10 17:20, genxtech wrote:
if re.search(search_string, in_string) != None:
While the other responses have addressed some of the big issues,
it's also good to use
if thing_to_test is None:
or
if thing_to_test is not None:
i
On Aug 8, 7:34 pm, Tim Chase wrote:
> On 08/08/10 17:20, genxtech wrote:
>
> > if re.search(search_string, in_string) != None:
>
> While the other responses have addressed some of the big issues,
> it's also good to use
>
> if thing_to_test is None:
>
> or
>
> if thing_to_test is not None:
>
On 08/08/10 17:20, genxtech wrote:
if re.search(search_string, in_string) != None:
While the other responses have addressed some of the big issues,
it's also good to use
if thing_to_test is None:
or
if thing_to_test is not None:
instead of "== None" or "!= None".
-tkc
--
http://ma
On Sun, Aug 8, 2010 at 3:32 PM, Thomas Jollans wrote:
> On Monday 09 August 2010, it occurred to genxtech to exclaim:
>> I am trying to learn regular expressions in python3 and have an issue
>> with one of the examples I'm working with.
>> The code is:
>>
>> #! /usr/bin/env python3
>>
>> import re
genxtech wrote:
I am trying to learn regular expressions in python3 and have an issue
with one of the examples I'm working with.
The code is:
#! /usr/bin/env python3
import re
search_string = "[^aeiou]y$"
You can think of this as: a non-vowel followed by a 'y', then the end of
the string.
On Monday 09 August 2010, it occurred to genxtech to exclaim:
> I am trying to learn regular expressions in python3 and have an issue
> with one of the examples I'm working with.
> The code is:
>
> #! /usr/bin/env python3
>
> import re
>
> search_string = "[^aeiou]y$"
To translate this expressi
I am trying to learn regular expressions in python3 and have an issue
with one of the examples I'm working with.
The code is:
#! /usr/bin/env python3
import re
search_string = "[^aeiou]y$"
print()
in_string = 'vacancy'
if re.search(search_string, in_string) != None:
print(" ay, ey, iy,
Ashok Prabhu wrote:
> The following is a sample of my problem. I get input from user and
> store it in variable 'b'. I want to match the user input with the
> contents of another variable 'a'. However I m not able to get the
> exact match. Could someone help?
>
print a
> c
> c+
>
b
> '
Hi,
The following is a sample of my problem. I get input from user and
store it in variable 'b'. I want to match the user input with the
contents of another variable 'a'. However I m not able to get the
exact match. Could someone help?
>>> print a
c
c+
>>> b
'c+'
>>> re.search(b,a).group()
'c'
[EMAIL PROTECTED] schrieb:
> I'm trying to parse a line of html as follows:
>
> 101.120:( KPA (-)
> Snow on Ground)0
>
> however, sometimes it looks like this:
>
> N/A
> Snow on Ground)0
>
>
> I want to get either the numerical value 101.120 (which could be a
> different number depending on
In <[EMAIL PROTECTED]>, dmbkiwi wrote:
> I'm trying to parse a line of html as follows:
>
> 101.120:( KPA (-)
> Snow on Ground)0
>
> however, sometimes it looks like this:
>
> N/A
> Snow on Ground)0
>
>
> I want to get either the numerical value 101.120 (which could be a
> different number
I'm trying to parse a line of html as follows:
101.120:( KPA (-)
Snow on Ground)0
however, sometimes it looks like this:
N/A
Snow on Ground)0
I want to get either the numerical value 101.120 (which could be a
different number depending on the data that's been fed into the page,
or in terms o
14 matches
Mail list logo