in reply to Re^3: Extract a pattern from a string
in thread Extract a pattern from a string
_OUTPUT_$s=ME170-5/2/8-ME172-5/2/8-ME4028ME172-5/2/8-ME196-5/2/8-ME4002; while ($s=~m/(\d{1,2}\/\d{1,2}\/\d{1,2})/g) {++$r;print "$r Found $1:" + .(pos($s)-length($1)+1) .$nl;}<br>
_OUTPUT_$s=ME170-5/2/8-ME172-5/2/8-ME4028ME172-5/2/8-ME196-5/2/8-ME4002; while ($s=~m/(\d{1,2}\/\d{1,2}\/\d{1,2})/g) {++$e;print "$e Found $1:" + .($-[1]+1) .$nl;}<br>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Extract a pattern from a string
by NetWallah (Canon) on Jun 11, 2012 at 13:54 UTC | |
by avim1968 (Acolyte) on Jun 14, 2012 at 05:15 UTC |