in reply to Re: how can i split a string to an array and convert it into regular expression
in thread how can i split a string to an array and convert it into regular expression

The string i want to convert is $string = 'gat_i2345'
it has no delimiter
  • Comment on Re^2: how can i split a string to an array and convert it into regular expression

Replies are listed 'Best First'.
Re^3: how can i split a string to an array and convert it into regular expression
by ikegami (Patriarch) on Dec 08, 2007 at 18:59 UTC
    What do you want the array to contain? ('gat', 'i2345')? Then _ is the delimiter. If you want to add the entire string to the array, simply use push @array, $string;.