Thursday, June 6, 2019

Sample Formula to Extract Characters after a Specific Character in a String

Example itemid's:
1) R0-KAA00-L02WA-CH-BK-13-0000 - Use a formula to extract "L02WA".

The purpose of this formula is to find the 3rd section following the second dash "-" (in the above example this is "L02WA"). For instance if an L shows up elsewhere ( ex: for the code "D3-LUO83-L1230-CL-WS-03-0000"), do not return the values following the first L in LUO, only return values from the L in the 3rd portion of the code (L1230).

Use a Formula(Text) field to find the next two characters after the L that occurs immediately following the second dash.

regexp_substr({itemid},'.+-.+-L(..)',1,1,null,1) 

 

No comments:

Post a Comment