cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

Needed a regex to (CC)

183530
New Contributor III

SELECT '(CC) ABC' REGEXP '\\b\\(CC\\)\\b' AS TEST1,

    'A(CC) ABC' REGEXP '\\b\\(CC\\)\\b' AS TEST2,

    'A (CC)A ABC' REGEXP '\\b\\(CC\\)\\b' AS TEST3,

    'A (CC) A ABC' REGEXP '\\b\\(CC\\)\\b' AS TEST4,

    'A ABC (CC)' REGEXP '\\b\\(CC\\)\\b' AS TEST5

expected result:

TEST1 = TRUE

TEST2 = FALSE

TEST3 = FALSE

TEST4 = TRUE

TEST5 = TRUE

0 REPLIES 0
Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.