Cannot search {2} in the text?

I'm pretty sure that this is a bug. The documentEditor.searchModule.findAll somehow partly accepts a regex (I've tried with a simple regex like 2|3 as the text to find and it finds & replaces OK) BUT somehow it also partly considers the input text as literal (I've tried with another valid regex like \{ or [{] which simply tries to escape the character going after or using the so-called character classes in regex) but it cannot find anything (the document content does have a string like {2}).

Here's the funnier part, I simply cannot find the text {2}, why? Now it seems to try to understand that it's a regex and not literal text (actually in this case I expect it treats the input string as literal). So although it's a regex but it's invalid because no char going before {2} so an exception thrown in the console like this:

    Uncaught SyntaxError: Invalid regular expression: /{2}/: Nothing to repeat

All the above is just experienced via your own demo, check it out here https://ej2.syncfusion.com/documentation/document-editor/find-and-replace/

In the Preview tab, you can try inserting a {2} into the document text. Then try typing {2} in the Text to find (optionally type some text to replace as well) and click Replace all. You should be able to reproduce what I've described here.

I'm really disappointed about why such a simple bug could be easily by-passed by your testers? I've heard about Syncfusion for years, never had a chance to try it out in a project. Now I'm having a small project to deal with Word document and think about Syncfusion being very promising. But the experience so far has not been great.

Thanks for your support anyway.

4 Replies 1 reply marked as answer

HC Harini Chellappa Syncfusion Team August 26, 2020 11:10 AM UTC

Hi Quan, 

We deeply regret for the inconvenience caused. 

We have considered the reported scenario as bug and logged defect report. Fix will be included in our upcoming EJ2 patch release which is tentatively scheduled on Sep 9th, 2020. Once included will update you. You can track the status from below link. 


Regards, 

Harini C 



QN Quan Nguyen Duy August 27, 2020 09:01 PM UTC

Thank you for your support. I really appreciate your effort especially supporting the community license which is rarely found in other commercial-grade software solutions.


HC Harini Chellappa Syncfusion Team August 28, 2020 04:37 PM UTC

Hi Quan, 

Most welcome. Thank you so much. 

Regards, 

Harini C 



HC Harini Chellappa Syncfusion Team September 10, 2020 11:40 AM UTC

Hi Quan, 

We are glad to announce that our EJ2 patch release v18.2.57 has been rolled out successfully and included fix for the reported scenario.  

Kindly upgrade your document editor source to latest version and check the reported scenario.  

Latest version CDN links  


Regards, 

Harini C 


Marked as answer
Loader.
Up arrow icon