本文主要是介绍memo,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
1.工程名称改为英文
2.写一篇删除c++代码注释的文章
3.写一篇直接替换一个文章中所有手机号最后4位为*的文章
4.工具增加一个参数,可以设置是以追加还是覆盖方式写入文件
5.模式需要提供具体,可以有默认模式,例如-wn,-wu以及-a,-o
以空格为间隔获取各个参数可以使用正则“(".+?"|.+?)(?:/s+|$)”
麻烦哪位专家把下面代码转成标准VB代码 谢谢!
$stockCode = 600000
$url = "http://money.finance.sina.com.cn/corp/go.php/vMS_MarketHistory/stockid/{0}.phtml" -f $stockCode
$wc = New-Object System.Net.WebClient
$content = $wc.DownloadString($url)
$reg = " <a target='_blank'/s+href='http://biz.finance.sina.com.cn/stock/history_min.php/?symbol=sh/d{6}&date=/d{4}-/d{2}-/d{2}'>/s*([^/s]+)/s+ </a>/s* </div> </td>/s* <td[^/d]*([^ <]*) </div> </td>/s+ <td[^/d]*([^ <]*) </div> </td>/s+ <td[^/d]*([^ <]*) </div> </td>/s+ <td[^/d]*([^ <]*) </div> </td>/s+"
$result = [RegEx]::matches($content, $reg)
foreach($item in $result)
{
$date = $item.Groups[1].Value # 时间
$opening = $item.Groups[2].Value # 开盘
$maxHigh = $item.Groups[3].Value # 最高
$closing = $item.Groups[4].Value # 收盘
$maxLow = $item.Groups[5].Value # 最低
Write-Host $date $opening $maxHigh $closing $maxLow
}
Private Sub demo()
Dim strData$
Dim reg As Object
Dim matches As Object, match As Object
strData = "r ""c:/Program Files/aa.txt"" ""c:/bb.txt"" QQ qq" & vbCrLf & _
""
Set reg = CreateObject("vbscript.regexp")
reg.Global = True
reg.IgnoreCase = True
reg.Pattern = "("".+?""|.+?)(?:/s+|$)"
Set matches = reg.Execute(strData)
For Each match In matches
Debug.Print match.SubMatches(0)
Next
End Sub
http://topic.csdn.net/u/20091110/19/233fb89b-cdc4-412c-bc7a-9ac38a63ea94.html?78873
这篇关于memo的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!