Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Regex

sswift13
7 - Meteor

I am searching a column to find data that matches "P****" where those four addition characters could be numbers or letters. Currently, I have 

ELSEIF regex_match([Prefix], 'P\d{4}.*') then

However, I believe this only searches for numbers.

 

How can I search for both letters and numbers? The word is usually "[letter][letter][letter][number][number]".

2 REPLIES 2
mpennington
11 - Bolide

\w will match any word character, so both numbers and letters:

 

RegEx.jpg

apathetichell
20 - Arcturus

.{4} would be any four characters and [0-9A-Za-z]{4} would be any combination of exactly 4 numbers or letters.

Labels
Top Solution Authors