Building regular expressions

The Regular Expression Builder helps you to build a regular expression rule by selecting constructs and combining them.

Procedure

  1. To build a regular expression:
    1. Click Regular Expression Builder on the InfoSphere® BigInsights™ Eclipse toolbar.
    2. In the Regular Expression Builder wizard, refine the expression, and click Finish. For details about refining the expression, see Regular Expression Builder. The regular expression is copied to the clipboard.
    3. Place your cursor within an AQL statement where a regular expression would appear, right-click, and select Paste.
  2. To alter an existing regular expression: This procedure replaces a regular expression. If you do not want to replace an expression, create an empty regular expression marker by using two slash (/) characters in an existing, syntactically correct AQL statement. For example:
    					create view MyRegex as
    extract regex // as match
    from Document D;
    
    
    create view MyRegexes as
    extract regexes /\d+/ and // as match
    from Document D;
    
    
    create view MyRegexFilter as
    select * 
    from Phone P
    where MatchesRegex(//, P.number);
    				
    1. Right-click a syntactically correct regular expression between the two slash (/) characters that surround the regular expression within an AQL statement in an AQL file, and select Regular Expression Builder from the pop-up menu. If the Regular Expression Builder item is not available from the pop-up menu, your cursor is not positioned between the two slash (/) characters that surround a syntactically correct regular expression.
    2. In the Regular Expression Builder wizard, select the constructs from the tab menu that is provided, or manually type them in the Specify a regular expression rule field. For more information about constructs, see Regular expression constructs and characters.
    3. Test the rule that is created by entering text in the Type the text that you want to use to test the rule field.
    4. Click Finish. The regular expression replaces the original regular expression in the file