in reply to How to get the value after a string
You can do this by being more general in the exclusion - you want digits following non-digits. eg:
#!/usr/bin/env perl use strict; use warnings; use Test::More tests => 1; my $str = '{\"id\":01,\"start_time\":\"1477954800000\",\"stop_time\":\ +"1485817200000\",\"url\":http:://www.example.com\}'; my ($extracted) = $str =~ /start_time\D*(\d+)/g; is ($extracted, '1477954800000', 'Value extracted');
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to get the value after a string
by dk1979 (Initiate) on Feb 08, 2017 at 15:28 UTC |