The previous time we used regular expressions to search for characters in HTML. We accidentally saw a video about regular expressions on channel9 and introduced the regular expression profiling tool from Microsoft Research. Rex is a simple command line tool that automatically generates matching strings from the. NET Regular Expression Model you entered. At the same time, Rex also supports API calls and runs quickly.
How does Rex work?
1First, translate the user's Regular Expression Model into symbolic finite automaton (symbolic finite robot ). For example, the regular expression ^ [0-9] {2,} $ indicates: 0 ~ It must start with a number between 9, Repeat twice or more times, and start with 0 ~ The number between 9 is the number of the ending group. This expression will be translated into SFA:
2. Then, the constraint solver generates corresponding string members.
Rex application instance
1. Download Rex tool http://research.microsoft.com/en-us/downloads/7f1d87be-f6d9-495d-a699-f12599cea030/
2Run rex.exe after decompression to view the help information:
3. Use the ^ [0-9] {2,} $ expression to generate 10 groups of data through REX: