Look here. If you are familiar with regular expressions
, let's get to the point. The name of this tool is called regular Expression exploration. You can download it from here. The current version is 1.0 release. Rex is a command line tool,
Specific use can be executed under CMD can see the usage, this is. NET program. We can reference it and then use the code below to generate the string array we want.
Copy Code code as follows:
<summary>
Generates the test.
</summary>
<remarks>author Petter Liu http://wintersun.cnblogs.com </remarks>
[Test]
public void Generatetest ()
{
string regex = @ "^1 (3[4-9]|5[012789]|8[78]) \d{8}$";
Rexsettings settings = new Rexsettings (regex) {k = ten, encoding = CHARACTERENCODING.ASCII};
var results = rexengine.generatemembers (settings);
foreach (var result in results)
{
Console.WriteLine (result);
}
}
Output:
18897190518
18889349691
18792280668
18831202949
15789824598
15998890392
13709912389
18779992048
13967892889
15928882992
Here we use the regular expression of the cell phone number. Set the number of builds is 10, encoding ASCII. There are many options. You can look at its members. These string data are used to do whatever you want.
Author:petter Liu