in reply to Re: find the substring
in thread find the substring
The use of the grouped regexp between /.../ allows you to remember the substring that matched the regexp.#!/usr/local/bin/perl $str = "a[-\.]*?b[-\.]*?c"; $str2 = "zzzza---..bcddddd"; $str2 =~ /($str)/; print $1,"\n";
But i'm not sure with that,can you please give some idea or give me your script if it's possible.
|
|---|