I try to learn the net grasp, groped by running the code, in the immediate window has access to
Large amounts of data, and the data is what I need, but how these data are cutting on the corresponding cell, really have no idea,
For help which master to help make it, thank you so much!
Sub Main ()
Dim strText As String
With CreateObject (" MSXML2 XMLHTTP ") "CreateObject (". WinHttp WinHttpRequest. 5.1")
. Open the "GET", "http://q.10jqka.com.cn/interface/stock/thshy/zdf/desc/1/quote/quote", False
'setRequestHeader content-type ", "" application/x - WWW - form - urlencoded"
'setRequestHeader "Referer", ""
. Send
StrText=. The responsetext
The Debug. Print strText
End With
End Sub
CodePudding user response:
This...... Nothing more is to look for some of the key things in common, then the split or instr,The others can't help you,
CodePudding user response:
Regular expression quick study regular expressions, for example, regular expressions (4 pages of A4 paper) http://download.csdn.net/detail/zhao4zhong1/1808549Fyi:
Function RegExpN (PTN, TXT, n) As String
'the Debug. Print "[" + RegExpN (" [012] {8}", "mno_if22220101_and11000011_or00111100_xor10101010. TXT", 1) + "] "
'[22220101]
'the Debug. Print "[" + RegExpN (" [012] {8}", "mno_if22220101_and11000011_or00111100_xor10101010. TXT", 2) + "] "
'[11000011]
'the Debug. Print "[" + RegExpN (" [012] {8}", "mno_if22220101_and11000011_or00111100_xor10101010. TXT", 3) + "] "
'[00111100]
'the Debug. Print "[" + RegExpN (" [012] {8}", "mno_if22220101_and11000011_or00111100_xor10101010. TXT", 4) + "] "
'[10101010]
'the Debug. Print "[" + RegExpN (" [012] {8}", "mno_if22220101_and11000011_or00111100_xor10101010. TXT", 5) + "] "
'[]
'the Debug. Print "[" + RegExpN (" [a-z] + (\ d +)/_.", "mno_if22220101_and11000011_or00111100_xor10101010. TXT", 4) + "] "
'[xor10101010]
'the Debug. Print "[" + RegExpN (" [a-z] + (\ d +)/_.", "mno_if22220101_and11000011_or00111100_xor10101010. TXT", 4.1) + "] "
'[10101010]
'the Debug. Print "[" + RegExpN (" & lt; abc> (. *) & lt;/abc>", "& lt; html> & lt; ab> AB & lt; abc> ABC & lt; Chinese characters/abc> & lt;/html>", 1) + "] "
'[& lt; abc> ABC & lt; Chinese characters/abc>]
'the Debug. Print "[" + RegExpN (" & lt; abc> (. *) & lt;/abc>", "& lt; html> & lt; ab> AB & lt; abc> ABC & lt; Chinese characters/abc> & lt;/html>", 1.1) + "] "
'[ABC] Chinese characters
Dim RTNSTR As String
Dim codestr As String
RTNSTR=""
With ScriptControl1
'Set the script language (VBScript is the default).
. Language="VBScript"
'Set the UI interaction (TRUE is the default).
. AllowUI=True
'Copy the script to the control.
'-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Codestr=""
Codestr=codestr + "Function RegExpTest (patrn STRNG, ns)" + vbCrLf
Codestr=codestr + "Dim regEx, Match, Matches, RetStr, ii" + vbCrLf
Codestr=codestr + "Dim nn, ss" + vbCrLf
Codestr=codestr + nn="fix (ns)" + vbCrLf
Codestr=codestr + "if nn=ns then" + vbCrLf
Codestr=codestr + "ss=1" + vbCrLf
Codestr=codestr + "else" + vbCrLf
Codestr=codestr + "ss=(ns - nn) * 10-1" + vbCrLf
Codestr=codestr + "end if" + vbCrLf
Codestr=codestr + "Set the regEx=New RegExp" + vbCrLf
Codestr=codestr + "regEx Pattern=patrn" + vbCrLf
Codestr=codestr + "regEx IgnoreCase=True" + vbCrLf
Codestr=codestr + "regEx. Global=True" + vbCrLf
Codestr=codestr + "Set Matches=regEx. Execute (STRNG)" + vbCrLf
Codestr=codestr + 2="0" + vbCrLf
Codestr=codestr + "For Each Match Matches in" + vbCrLf
Codestr=codestr + 2=2 + 1 "" + vbCrLf
Codestr=codestr + "if ii=nn then" + vbCrLf
Codestr=codestr + "if ss=1 then" + vbCrLf
Codestr=codestr + "RetStr=Match. The Value" + vbCrLf
Codestr=codestr + "else" + vbCrLf
Codestr=codestr + "RetStr=Match. SubMatches (ss)" + vbCrLf
Codestr=codestr + "end if" + vbCrLf
Codestr=codestr + "exit for" + vbCrLf
Codestr=codestr + "end if" + vbCrLf
Codestr=codestr + "Next" + vbCrLf
Codestr=codestr + "RegExpTest=RetStr" + vbCrLf
Codestr=codestr + "Set the regEx=Nothing" + vbCrLf
Codestr=codestr + "End the Function" + vbCrLf
nullnullnullnullnullnullnullnullnullnull