Extracting a character string of varying lengths and positions
I want to extract character strings from a variable (Dx1), but the length and position of the strings varies, but they are separated by dashes. Sometimes there are multiple dashes. For example... "7812-abcdef -9" "v7892-xyz -0" "812-fghkj -0" "17361-gf-jhyt -9" What I would like to do is create a new variable that extracts the digits/characters before the first dash, and then anoth...