7 hours ago
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.
3 hours ago
Masking with a backslash should do the trick:
SPLIT ( <your property>; "\""; 2 )
6 hours ago - last edited 6 hours ago
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.
5 hours ago
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.
4 hours ago
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.
4 hours ago
Seems that doesn't work.
Barry.
3 hours ago
Masking with a backslash should do the trick:
SPLIT ( <your property>; "\""; 2 )
2 hours ago
Thanks Stefan. I knew someone on here would know what the trick to masking was.
2 hours ago
Thanks @Stefan L_
I thought there was something.
I tried that but must have used a forward slash. 🙄
Barry.