CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Regular Expressions: Re: [dk1979] How to get the value after a string : Edit Log



Laurent_R
Veteran / Moderator

Feb 8, 2017, 7:58 AM


Views: 4750
Re: [dk1979] How to get the value after a string

Hi,

an example on how to do it (demonstrated under the Perl debugger):

Code
  DB<1> $s = '{\"id\":01,\"start_time\":\"1477954800000\",\"stop_time\":\"1485817200000\",\"url\":http:://www.example.com\}' 

DB<2> print $1 if $s =~ /start_time\\":\\"(\d+)\\"/;
1477954800000
DB<3>



(This post was edited by Laurent_R on Feb 8, 2017, 7:59 AM)


Edit Log:
Post edited by Laurent_R (Veteran) on Feb 8, 2017, 7:59 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives