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.