Help with regex - extracting text.
Posted
by Yeti
on Stack Overflow
See other posts from Stack Overflow
or by Yeti
Published on 2010-06-17T18:31:00Z
Indexed on
2010/06/17
18:33 UTC
Read the original article
Hit count: 310
I have 3 separate strings:
$d = 'Created on November 25, 2009';
$v = 'Viewed 17,603 times';
$h = '389 hits';
Which needs to be converted to:
$d1 =
{unix timestamp of November 25, 2009};
$v1 = "17603";
(commas stripped if it exists)
$h1 = "389";
What is the most efficient way to do this (possibly with regex)? Any code snippet would be great.
© Stack Overflow or respective owner