robocop100
asked on
Perl string parsing
I have a string:
$str = 'JSESSIONID=ABC123; path=/path';
how do I extract 'ABC123' into a new variable?
$str = 'JSESSIONID=ABC123; path=/path';
how do I extract 'ABC123' into a new variable?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
$str =~ /.*=(.*?);.*/;
$var = $1;