powershell
Jan. 25th, 2009 11:40 am$postURL = "http://yms.livejournal.com/2156384.html"
$web=new-object net.webclient
$page=$web.DownloadString($postURL+"?format=light")
if($page -match "@ <a.+?>(\d+)</a>-<a.+?>(\d+)</a>-<a.+?>(\d+)</a> (\d+):(\d+):(\d+)")
{
$posttime=new-object DateTime($Matches[1..6])
write $posttime
}
Одним махом шесть параметров в конструктор передавахом.
$web=new-object net.webclient
$page=$web.DownloadString($postURL+"?format=light")
if($page -match "@ <a.+?>(\d+)</a>-<a.+?>(\d+)</a>-<a.+?>(\d+)</a> (\d+):(\d+):(\d+)")
{
$posttime=new-object DateTime($Matches[1..6])
write $posttime
}
Одним махом шесть параметров в конструктор передавахом.