The regular expression testing tool can also be used as a general data processing tool.
: Http://www.symental.com/sfw/RegTestTool.zip
1. Sometimes we often needSource codeTherefore, the tool provides the function of directly collecting HTML. Enter the URL and click the button next to it to collect the HTML. Enter the regular expression below and click the button below to process the search result.
The biggest feature of this tool is that you can quickly click a blank area in a row.3
You can directly generate VBCodeGo to the clipboard and copy it to the VB6 editor.
2. Functions of all buttons on the interface:
Download Code: Download the source code of the previous URL page
Exact match: test whether the string matches the content. True or false is returned.
Search Result: start processing the expression and output all matching items. By default, the entire matching result and captured content are displayed. To adjust the content, you can process it on the "Settings" side.
Replace all: Replace the regular expression. For example, you can replace the matched content with a specific character and capture the content like $1.
Settings:ProgramYou can set some parameters here. For example, you can set whether to use utf8 to capture webpages, whether to display only captured content, and set the interface language.
3. The following is an example of how to collect the lottery number:
Address: http://video.shishicai.cn/haoma/jxssc/list/more.aspx
Expression: "bonusnumberstring": "/d,/D, (/d,/d,/d)/|/D", "bonustime ":". +? "," Issuenumber ":" (. + ?) "}
Click "search result"
4. This section describes how to generate code in three consecutive blank forms:
After you have set the expression and the text content processed above, 3-click the blank area of the form. A window will pop up prompting you that the available code has been automatically generated and copied to the clipboard. Press Ctrl + V in your vb6ide.
The software will make a rough judgment on your current actions.
(1) If you want data to be obtained by downloading the webpage. Double-click the URL, and the background of the URL input box becomes red. In this case, if you press 3 to open a blank window, the generated code will have multiple functions for downloading the Page code. The data processed in the main function is downloaded from this URL. Try it out.
(2) If you want to replace the data content, that is, use the regular expression replace method, double-click the box after replacement. After the "replace all" button, the background of the replacement box turns red. In this case, the generated code is replaced by 3-click the form.
(3) because the VB Environment supports a limited number of lines, if you process too much content above, the software provides a maximum of 19 lines. You can modify the code, for example, assign values to the strdata variable.
Example:
Http://topic.csdn.net/u/20110115/20/70f6b5fa-bc5a-4bf5-b8e0-6f511dacdce0.html
Http://topic.csdn.net/u/20110701/15/67add9ff-8600-40c6-8ad5-844d2e154e9b.html
Sysdzw
QQ: 171977759
Email: sysdzw@163.com
Http://hi.baidu.com/sysdzw
2011-01-17
A bug. You need to fix it. Expected correction points:
1. The code should have been generated three times in a row after the form is clicked, but now it takes more than four times.
2. Read the current ignorecase, global, and Multiline attributes and add them to the automatically generated code.
4. append the tool information in the generated code header and set the comment language according to the language of the software.
As follows:
'The code is automatically generated by the regular expression test tool v1.0.12. Please call the testreg process directly.
'This code was generated by "regtesttool v1.0.12", please call the sub testreg.
5. msgbox prompt for successful code generation. If you forget the window title, set it according to the language.
2011-01-18
The line and display word matching on the English interface are reversed.
2011-02-18
Corrected the abnormal response when pressing the Del key in the expression text box.
2011-02-28
Fixed the button text issue on the interface. The button text does not need to be left blank.