[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] Regular Expression Definition



I am trying to 'split' the following line:

<ASCII 10> YY,XX   BIN #  1-IDSXP   #  2-VGS1P   #  8-IGSO    # 10-VGF    \n
          ^     ^^^   ^ ^^       ^^^ ^^       ^^^ ^^      ^^^^ ^      ^^^^
where ^ = whitespace.  I need the line to be place into the array as follows:

[YY,XX] [BIN] [#  1-IDSXP] [#  2-VGS1P] [#  8-IGSO] [# 10-VGF]
                ^^           ^^           ^^          ^
so that the numerical data lines that follow will correlate (array
index-wise) with these headers.  I have tried various combos of /s, etc.,
but the varying whitespaces are reeking havoc.  Sometimes, I will also
end up with the fist element of the array containing the NULL character.

Anyone's help would be greatly appreciated, I am new to Perl and have not
mastered regular expressions yet...

Thanks.
---
Mark Yannuzzi
myannuzzi@aya.yale.edu


***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch