Community
Participate
Working Groups
I'm building a custom db search facility, which builds an SQL SELECT statement based on user selections. One of the features I've included is the ability to specify generic user field selections such as 'ibm*' and this will return all results beginning with 'ibm' in the particular field. To do this I replace all * characters in the entered user field with % character and to achieve this I use the following statement. text string = searchValue.replaceStr("*", "%"); This works well in server code (java) but when I moved the logic to the client code (javascript) I received the following message ... [CRRUI2002E] sqlAddWhereFields An error occurred inside ModLogs: Invalid regular expression: nothing to repeat Richard
I have used the following statement as a work around ... text string = searchValue.replacePattern("/*", "/", "%", true); Richard