I'm bumping this in hopes of finding an answer to this. I have a similar requirement, in this specific case for a user enrolled in multiple sections if you send the canvas_course_sectionsissourceids, it returns a comma separated list of entries, and I only want the first entry (which unfortunately in this particular case is not always the courseoffering_sourcedid so that is not an option for this use case).
A similar common use case that I can imagine is to assist in matching a username in a "username@domain.edu" style format to the the sAMAccountName format by only taking the string up to the @ symbol.
It does not look like there is any way to run any regex or run code before a launch of an LTI 1.3 tool to change the parameters, and it would have to be done on the tool side which is not always as flexible. I'm hoping there is some secret method of doing this that I'm not finding in my search of the forums. Any ideas?