#!/usr/bin/perl -w use strict; my $look_for = 'foobar'; my $string = 'this whole script is foobared'; my $result = substr($string,index($string,$look_for),length($look_for) +); print $result;
grep$str =~ /(Version\s+\d+\.\d+)/; $result = $1;
|
In reply to Re: extracting a substring?
by grep
in thread extracting a substring?
by CHRYSt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |