in reply to Regular expression question
Hi try this,
#!/usr/local/bin/perl -w use strict; my $str = "Identities = 1529/1540 (99%), Gaps = 2/1540 (0%)"; my ($output) = $str =~ m/(\d+%)/gsi; print "$output\n"; [download]