In the example you gave above, you could do something like this (assuming the string you are checking is in $_):
if ( /alt="Version (.\...)"/ ) { $version = $1; }
You could also crunch that to this:
($version) = /alt="Version (.\...)"/;
In reply to Re: extracting a substring?
by ehdonhon
in thread extracting a substring?
by CHRYSt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |