I have a case statement in spark sql which is like this -
CASE
WHEN (USER_NAME rlike '^JAMES\\\\\\\\' OR USER_NAME rlike '^\\\\w{1,2}\\\\d{6}\\\\w{0,2}') THEN SUBSTRING(USER_NAME,3,6)
WHEN (USER_NAME rlike '^MK\\\\\\\\' OR USER_NAME rlike '^\\\\w{1,2}\\\\d{6}\\\\w{0,2}') THEN SUBSTRING(NORMAL_USERNAME,3,6)
ELSE ''
END New_User_name
Can someone please help decode it. What is '^\\\\' stands for. Please help to find out the output (New_User_name) for below six USER_NAME values
USER_NAME
JAMES\LG590899PK
JAMES\221031999
MK\221031999
MK\LG590899PK
GECCTTTTT\X2790GHDDSD
212687987