yesterday
Is it possible to use a SPLIT expression where the delimiter is " ?
We have long product names where the standard format is 'TYPE OF FINISH - MANUFACTURER PRODUCT "COLOUR"' and I'd like to be able to seperate the COLOUR component of the long name.
Operating system used: Windows
Solved! Go to Solution.
yesterday
Masking with a backslash should do the trick:
SPLIT ( <your property>; "\""; 2 )
yesterday - last edited yesterday
There are SPLIT functions in the expression editor.
It might be a multi-stage process though.
SPLITRIGHT to get COLOUR" and then SPLITLEFT that result to get just COLOUR.
The only problem then is the functions use the double quote symbol in the command.
I am not sure if you can change that.
So instead of "delimiter" - because """ (triple quotes) would make no sense, you can change it to a single quote 'delimeter' - so you will have '"' in the expression.
Changing to single quotes works in GDL, I can't say I have tried it in the expression editor.
Barry.
yesterday
Barry, thanks for the response. I understand the SPLIT functions in expression editing. My qeustion was more about if it is possible to use the double quote marks as delimiter as we have hundreds of surfaces in this format and would rather not rename all of them through all of our standards.
Some script languages allow you to use ASCI codes and the like to refer to a specific character rather than the actual character that has meaning in the script language.
yesterday
That is why I suggested trying to change the quotes used in the expression to single quotes.
So ' " ' instead of " " " (spaces are just for clarity).
Barry.
yesterday
Seems that doesn't work.
Barry.
yesterday
Masking with a backslash should do the trick:
SPLIT ( <your property>; "\""; 2 )
yesterday
Thanks Stefan. I knew someone on here would know what the trick to masking was.
yesterday
Thanks @Stefan L_
I thought there was something.
I tried that but must have used a forward slash. 🙄
Barry.
yesterday
Glad to hear. 🤗
BTW: \n is new line, \t is tabstop, but both only work if milled through GDL.
Between language versions there are some differences in the exact notation. Does the semicolon work for you?