Microsoft Rex Regular Expression Tool

Source: Internet
Author: User

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:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.