A RegEx question

2004-07-26 Thread Ian Marlier
Hi, all -- 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 there's on

A regex question

2002-01-14 Thread Donald J Miller
Hello, I have a line of text like so: SNOW   12HR    00-00    00-00 1- 2 I've written a regex to parse these lines and grab the values in between the hyphens like so: while ($line =~ /([\d]{1,2})|([T+])/g) {     push @snow, $1; } On occasion instead of a numerical snowfall amount

Re: A RegEx question

2004-07-26 Thread JupiterHost.Net
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

Re: A RegEx question

2004-07-26 Thread Ian Marlier
> 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 >>

Re: A RegEx question

2004-07-26 Thread Gunnar Hjalmarsson
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

Re: A regex question

2002-01-14 Thread Tanton Gibbs
want. - Original Message - From: Donald J Miller To: [EMAIL PROTECTED] Sent: Monday, January 14, 2002 12:34 PM Subject: A regex question Hello, I have a line of text like so: SNOW 12HR00-0000-00 1- 2 I've written a regex to parse these lines and grab the values in b

Re: A regex question

2002-01-14 Thread John W. Krahn
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

Re: A regex question

2002-01-14 Thread Tanton Gibbs
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

this is basically a regex question; processing 'ps'

2001-08-31 Thread GoodleafJ
Basically, what I want to do here is catch the output from ps. The ultimate goal is to find processes meeting certain criteria (not yet detailed) and kill them. One of the things I'll want to do is find out how long a process has been running, so essentially I'm trying to extract the date from ps

Re: this is basically a regex question; processing 'ps'

2001-08-31 Thread smoot
> [EMAIL PROTECTED] said: > Basically, what I want to do here is catch the output from ps. The ultimate > goal is to find processes meeting certain criteria (not yet detailed) and > kill them. ps output varies by OS and depends on the flags you give it. Also I have found some fields are empty