in reply to Cleaning Regexp

I am kind of new to Perl, but I think that you can do a split() on the line you have, using split('character') where character is whatever you want to split the line with. Then just loop the new array searching for your string again. That should then give you a matching string which has been stripped at whatever character you choose to split with.

Replies are listed 'Best First'.
Re: Cleaning Regexp
by hillard (Acolyte) on Jul 31, 2001 at 00:08 UTC
    Oh, it would look like this I think...
    @new_array = split(' '); #inside the if block (splitting on a space)
    then... write a loop like your first one to find the entry in the new array that matches your pattern
      I am making myself look pretty silly here by not giving complete thoughts, if you just split on '=' in a line you have already matched, then the array element after 'eid' will be your data... here ends my dismal attempt at posting something useful...