Jan. 25th, 2009

powershell

Jan. 25th, 2009 11:40 am
yms: (Default)
$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
}


Одним махом шесть параметров в конструктор передавахом.

Profile

yms: (Default)
Michael Yutsis

March 2022

S M T W T F S
  12 345
678910 1112
13141516171819
20212223242526
2728293031  

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Mar. 24th, 2026 02:10 pm
Powered by Dreamwidth Studios