Ian Marlier wrote:
I'm in the process of writing a script to migrate from one wiki
package to another.
The old wiki help articles in a series of flat text files. The new
one holds everything in MySQL, so I need to parse the text files
into a single SQL import script. I've got most of it, but the
> Ian Marlier wrote:
>> Hi, all --
>
> Howdy,
>
>> I'm in the process of writing a script to migrate from one wiki package to
>> another.
>>
>> The old wiki help articles in a series of flat text files. The new one
>> holds everything in MySQL, so I need to parse the text files into a single
>>
Ian Marlier wrote:
Hi, all --
Howdy,
I'm in the process of writing a script to migrate from one wiki package to
another.
The old wiki help articles in a series of flat text files. The new one
holds everything in MySQL, so I need to parse the text files into a single
SQL import script. I've got m
PROTECTED]>
Sent: Monday, January 14, 2002 5:50 PM
Subject: Re: A regex question
> Tanton Gibbs wrote:
> >
> > If you know they will always be around -, then you might be able to do
> > something like:
> >
> > while( $line =~ /(\d\d?-\d\d?)|(T
Tanton Gibbs wrote:
>
> If you know they will always be around -, then you might be able to do
> something like:
>
> while( $line =~ /(\d\d?-\d\d?)|(T+)/g ) {
> push @snow, ($1 || $2); #T will be $2, not $1
This won't work because once $1 has been set it retain that v
If you know they will always be around -, then you might be able to do
something like:
while( $line =~ /(\d\d?-\d\d?)|(T+)/g ) {
push @snow, ($1 || $2); #T will be $2, not $1
}
Also, I'm not sure why you had all of the [], they make a character class
which is probably not what you want.
-