Overview

Regex Builder utility will enable user to create/generate various regular expression patterns with ease using an intuitive web based graphical user interface. Regex Builder utility will also provide capability to test the generated regular expression pattern with help of embedded Regex Tester. This utility will be a great help for various users who are not well versed in writing/creating regular expression, as user will not have to write the Regular Expression manually. But user can generate the Regular Expression on the fly just by selecting options on user friendly GUI and then test the generated patterns by using embedded Regex Tester utility.

Prerequisites

User must have some basic knowledge of the regular expression patterns used in java.

Generate Regex Option in Ephesoft

There is an option for generating the regex pattern near to every field where regex pattern is required as shown in the below figure.

 

400px-3.1_RegexBuilder_10001

 

Regex Builder dialog will appear when a user clicks upon Generate regex button. Regex builder dialog will look as shown in figure below:

 

400px-3.1_RegexBuilder_10002

 

Contents of Regex Builder

As shown in the figure above, Regex Builder dialog contains the following sections:

  1. Text Section
  2. Regex Quantifier
  3. Regex Group
  4. Regex Tester
  5. Button Panel

Text Section

400px-3.1_RegexBuilder_10003

 

400px-3.1_RegexBuilder_10004

 

  1.  In this section user can match either “Match exact text” or “Text in range” (as shown in the above fig.). For example if a user wants to match exact String like john, Invoice etc. then user can select the “Match exact text” option and can write the exact string to the text field.
  2. Match exact text section also contains many other options like any special character text, word boundary, any character etc. as shown in the above figure
  3. If a user wants to match any string with text in range then user can select any number of desired options in the “Text in range” section. For example if a user wants to select the text in range [a-zA-Z0-9], then it could be easily selected by just clicking the check boxes accordingly.
  4. Text in range section also contains many other options like special character, word boundary, any white space character, upper case range, lower case range, digit range etc. as shown in the above figure.

 

Regex Quantifier

400px-3.1_RegexBuilder_10005

 

  1. This section gives user a capability for selecting the quantitative options for the input text selected. For example if a user wants to select a string which can be any letter or any digit, any number of times then user can directly select the option “Any number of times” by just selecting the required radio button.

 

400px-3.1_RegexBuilder_10006

 

  1. User can also specify the number in this section. For example if the user wants to select a string which contains any letter 3 times, then user can directly select this radio button and can enter the desired number . User can also select minimum and maximum number of times by just selecting the option for between min and max time.

 

Regex Group

400px-3.1_RegexBuilder_10007

 

  1.  In this section user can select options for case insensitive search or grouping feature for java regular expression. For example if a user wants to search for a word Invoice (case insensitive), then user have a facility for selecting these options by just checking the check box.
  2. User can also select the option for applying regex quantifier to the entire group by just selecting the option for applying regex quantifier to the entire group.

 

Button Panel

400px-3.1_RegexBuilder_10008

 

  1.  If the user wants to perform any “Followed by” or “Or” operation then user has to add the new tab by just clicking on add button as shown in the below figure. For example if a user wants a string that contains three digits followed by a comma then first user has to select the input for any digit three times then followed by comma.
  2. Clicking upon add button will add a new tab which contains the similar options as that of previous tab. Here the user can select anything like Followed by, Or, Only if followed by etc. options. In this way user can add any number of tabs for generating the required regular expression.

 

400px-3.1_RegexBuilder_10009

 

  1.  Remove button will close the last opened tab. Remove button will be enabled only in case if more than one tab is there on the regex builder dialog.
  2. Reset button will reset all the values selected for generating the regex pattern.
  3. Close button will close the regex builder dialog.

 

Regex Tester

400px-3.1_RegexBuilder_10010

 

Regex Tester contains the following sections:

  1. Regex Pattern: This text area will contain generated regex pattern based on the inputs.
  2. String to be matched: This text area will contain the sample string that you specify which is to be matched against the generated regex pattern when the “Test Regex” button is selected.
  3. Test Regex: This button will find all the matches of regex pattern within the string. Terms that match the regex in the “Strings To Be Matched” section will be highlighted in alternating green/yellow colors(As shown in the below figure).
  4. Select Regex: This will populate the generated regex pattern to the field from where this regex builder utility is being opened.

 

400px-3.1_RegexBuilder_10011

Was this article helpful to you?

wikiadmin

Comments are closed.