cancel
Showing results for 
Search instead for 
Did you mean: 

How to Split using Regex expression

pranil2k2
Contributor

Hi,

I need some help on spliting the user name on basis of Regex expression.My user Name is an combination of mutliple users and i cant use comma to split them. so, i tried regular expression and which is working good on DB level and planned to implement same in Snaplogic, but it is not working. Please some one can help me here.
image

8 REPLIES 8

Hi @pranil2k2

Here is an expression that produces the results you are looking for:

$NAME.match(/[^,]+,[^,]+/g)

HI,

Thanks for the information.

Anil

pranil2k2
Contributor

Hi,
so by doing above can I except the result will be like three rows as below?
john, maria
lisa, awari
Arun, john(TCS)

pranil2k2
Contributor

The names are combination of first name and last name saperated by comma. so the output will be like
john, maria (first name, last name)