Bug 409276 - String replaceStr function produces CRRUI2002E error
Summary: String replaceStr function produces CRRUI2002E error
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-28 08:28 EDT by Richard Moulton CLA
Modified: 2017-02-23 14:06 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Moulton CLA 2013-05-28 08:28:45 EDT
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
Comment 1 Richard Moulton CLA 2013-05-28 08:41:30 EDT
I have used the following statement as a work around ...

text string = searchValue.replacePattern("/*", "/", "%", true);

Richard