equalOne

equalOne logo

What Is Alteryx RegEx – Regular Expression

start your free trials with equalOne

What is Alteryx RegEx

Alteryx RegEx (regular expression) tool is able to identify patterns in a string and extract the information from the string by using the 4 built in methods: replace, tokenize, parse and match. Scenario: A customer data file contains the address information. We would like to separate floor and house unit number from the address. We know that the highlighted part of the address are the floor and unit number. How do we dissect out this block of text from address? Customer ID Name Address 1 ONG SIAU XIAN 1 Hougang St 91 #02-08, 538692, Singapore 2 RASIDAH BT RAHMAT 683C WOODLANDS DRIVE 62 05-153, 733683, Singapore 3 HAYATI AMID 135 Jurong East Street 13 #04-331, 600135, Singapore 4 CHRISTINA WONG BLK 133 JALAN BUKIT MERAH, #01-508 160133, Singapore Workflow: Connect the regex tool to the input tool, use the parse method to extract the floor and house unit number, connect the browse tool to view the result. Step Tool Configuration / Result 1 Text Input 2 Regex Use the (….) to mark the block of text we would like to extract, then specify the pattern of this block. In our case, the floor and house number are represents by XX-XXX (2 digits for floor and 3 digits of house number separated by ‘-‘ ). So, we use the expression (d{2}.d{3}). d – means digit You can check the regular expression from the drop down list of the regex tool. 3 Browse After executes the workflow, there is a new column generated for house no.

Categories

Get your free trial today

Recent Posts

Contact Us

Singapore

Malaysia

Sales

sales@equalone.com