To get whatever's before the |:
($data_hash{$index}) = $str =~ /([^|]*)/;
( I originally posted ($data_hash{$index}) = $str =~ /(\d+)/;. )
In reply to Re: Removing digits until you see | in a string
by ikegami
in thread Removing digits until you see | in a string
by kevyt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |