Regular Expressions isn't really a strong point of the U2 line, but what it IS good as it using delimiters to separate strings. You mentioned that this is in a select list and based on your criteria you could do it one of two ways.
- Value is delimited by a forward slash
- Delimiter is always in the same character position of the string.
- Values appear in a Select List. (which I assume means that they are IDs in a file, for this exercise we will call that file FOO.
If you know that the forward slash is only used as a delimiter and does not exist in the string before or after the delimiter position you mentioned is consistent you can use FIELD which allows you to essentially split the string on a character into a string array and reference one of more values of that array to be returned.
SELECT FOO SAVING EVAL "FIELD(@ID,'/',1)"
or if the value repeats and you want to remove duplicates
SELECT FOO SAVING UNIQUE EVAL "FIELD(@ID,'/',1)"
If you can't guarantee that there are no forward slash you can just use the character position reference. This is probably the best choice with limited knowledge.
SELECT FOO SAVING EVAL "@ID[1,8]"
or
SELECT FOO SAVING UNIQUE EVAL "@ID[1,8]"