You need to sign in to do that
Don't have an account?
benito dardo
search wildcard string (question marks) in SOSL
Hi !
I would like to perform a SOSL and search for the string "????".
By reading the doc I understood I have to escape it and surround it with doble quotes
string searchString = '"\\?\\?\\?"'; string s = 'FIND \''+ searchString +'\' IN ALL FIELDS RETURNING Case(Id,Subject,Description,LastModifiedDate,Status,Priority WHERE IsClosed = false ORDER BY LastModifiedDate DESC) LIMIT 100'; List<List<SObject>> auxSearchList = new List<List<SObject>>();
As a result I'm getting "Invalid string literal '\?\?\?'. Illegal character sequence '\?' in string literal"
I have also tries with :
'\?\?\?'
'???'
... and other combinations, but I get different errors like "search term must be longer than one character: ???"
Thanks in advance.