Hi Ondina,
With that being the case, I think your best bet is to return to SUBSTR. The following calculation checks to see if there is a “?” in {field} and if so, it will return just the portion between the “.com/” and the “?”. If not, it will just return anything after the “.com/”. IF(SEARCH("?",{field})>-1,SUBSTR({field},SEARCH(".com/",{field})+5,SEARCH("?",{field})),RIGHT({field},LEN({field})-(SEARCH(".com/",{field})+5)))
In the back of my head, I have a nagging feeling there may be some cases where this will do something unexpected, but hopefully it works for the bulk of what you’re going to be dealing with.
Good luck! :-)
Kathy