Re: regex extraction problem



On Sunday 28 May 2006 12:20 am, John W. Krahn wrote:
tom arnall wrote:
the following code:

$_='abcd';
@f = /(x)(y)|(a)(b)/;

makes the first two cells of '@f' to be undefined, then puts 'a' and 'b'
in the third and fourth cells. how do i get the system to put 'a' and 'b'
in the first two cells and to produce no undefined cells?

@f = grep defined, /(x)(y)|(a)(b)/;


John
--
use Perl;
program
fulfillment

yes. solves my problem. how did you find out about this?

thanks,

Tom Arnall




--
thanks,

Tom Arnall
north spit, ca
.



Relevant Pages

  • Re: regex extraction problem
    ... tom arnall wrote: ... the third and fourth cells. ... use Perl; ...
    (perl.beginners)
  • Formatting cells
    ... puts in a forecast date. ... forecast date even though it matches it does not work. ... the cells to date, cut the cells changed the format then pasted them ...
    (microsoft.public.excel.programming)
  • Re: another formula question
    ... the if statement checks whether A1+B1 is not equal to zero. ... If it isn't, it puts in the value A1+B1, if it does equal zero, it puts in a ... > formula down to copy it to other cells where there is no total due to no ... > get rid of the $0.00 in all the cells ...
    (microsoft.public.excel)
  • Re: Re:compare to array in another workbook and record results
    ... for D3 in your lookup table. ... destination workbook to an array in a source workbook. ... other cells, it puts 0's in all the other cells. ... and puts 0's in the rest. ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Way to put multiple rows into the same column.
    ... want to rearrange each row to become a single column. ... Eg. Cells ... transposed the data but this only puts each row in it's own column. ...
    (microsoft.public.excel.misc)