On 29/06/2010 15:14, Stephen Hansen wrote:
True: but I've personally never seent he point of the csv module unless
we're talking about a more complicated csv format, such as one with
quoting in fields. I don't know if that's what the OP is working with,
but good point: csv might be a good approac
On 6/29/10 2:51 AM, Sion Arrowsmith wrote:
Stephen Hansen wrote:
On 6/28/10 10:29 AM, Ken D'Ambrosio wrote:
for line in file:
match = re.search((seek)",(.*),(.*)", line) # Stuck here
[ ... ]
name, foo, bar = line.split(",")
if seek in name:
# do something with foo and
Stephen Hansen wrote:
>On 6/28/10 10:29 AM, Ken D'Ambrosio wrote:
>> for line in file:
>> match = re.search((seek)",(.*),(.*)", line) # Stuck here
> [ ... ]
> name, foo, bar = line.split(",")
> if seek in name:
> # do something with foo and bar
>
>That'll return True if the wo
On Monday 28 June 2010 10:29:35 Ken D'Ambrosio wrote:
> Hi, all. I've got a file which, in turn, contains a couple thousand
> filenames. I'm writing a web front-end, and I want to return all the
> filenames that match a user-input value. In Perl, this would be something
> like,
>
> if (/$value/
On 6/28/10 10:29 AM, Ken D'Ambrosio wrote:
Hi, all. I've got a file which, in turn, contains a couple thousand
filenames. I'm writing a web front-end, and I want to return all the
filenames that match a user-input value. In Perl, this would be something
like,
if (/$value/){print "$_ matches\n
On 06/28/2010 07:29 PM, Ken D'Ambrosio wrote:
> Hi, all. I've got a file which, in turn, contains a couple thousand
> filenames. I'm writing a web front-end, and I want to return all the
> filenames that match a user-input value. In Perl, this would be something
> like,
>
> if (/$value/){print
Hi, all. I've got a file which, in turn, contains a couple thousand
filenames. I'm writing a web front-end, and I want to return all the
filenames that match a user-input value. In Perl, this would be something
like,
if (/$value/){print "$_ matches\n";}
But trying to put a variable into regex