Hello,I need to parse to a column, every time a product code appear.The product codes have this format:SKU 0726709 ("SKU" + 7 numbers).Here is an example.Thank you
regex parse mode - (SKU\s\d{7}) matches your desired output.
hi @BautistaC888
If unfamiliar with Regex or if challenging, a tool-based (though less-efficient) approach also works..
hEY @BautistaC888 !
Use a formula tool with this formula below:
IIF(REGEX_Match(REGEX_Replace([Product], ".*(SKU\s*\d+).*", "$1"), "SKU\s*\d+")=-1,REGEX_Replace([Product], ".*(SKU\s*\d+).*", "$1"),Null())
Hope that helps!
Hi @marcusblackhill - FYI - Regex_Match can return boolean values (despite what you may have heard on an otherwise wonderful Alteryx Academy video on regex) so:
IIF(REGEX_Match([Product], ".*SKU\s*\d{7}.*"),REGEX_Replace([Product], ".*(SKU\s*\d{7}).*", "$1"),Null())
is the same as yours... no reason for the unwieldy "=-1" part...