I would greatly appreciate some help on anyone that has experience in working with Rich Edit controls in Delphi that support Regular Expression searches.
I’ve toyed around with RichEdit.dll V3 based controls only to find that MS’s ITextSelection.FindText implementation uses some MS Mickey Mouse variant of regular expressions (i.e. ^p for paragraph) and so on.
Regular expression searches against TRichEdit1.text return mismatched SelStart locations due to hidden RTF formatting.
I guess this rules out any RichEdit.dll based controls/components unless someone could suggest a workaround?
I’ve also had a look at Dream Rich Editor but am worried that this is longer maintained (as of 2005). Otherwise, this looks ideal but cannot find any contact information to ask what ReGex syntax is supported (i.e. PCRE?)
Another option was ProfHTMLEdit but that chocked on the 2MB HTML file I tested it against. Editing was also non responsive on large files. Shame, as the control looked promising.
Yet another component was TRichView but sadly that does not appear to support searching using Regular Expressions.
Simply put, my requirement is a Delphi 7 control that allow simple editing (i.e. bold, italic, selection alignments) and most importantly, the ability the search using Regular Expressions (preferably PCRE.. but not necessarily). Not too fussed what the underlying storage mechanism (rtf, html, xyz) is.
Any help or pointers/hints/tips greatly appreciated.
This link may help. I can’t speak from experience with the components mentioned there, but as a HelpScribble user of many years I can say that Jan Goyvaert’s support for his products is consistently outstanding. You might try contacting him – he may know of a useful component. It does occur to me that if you copied the text from a RichEdit control to a string variable (without formatting), you may be able to search that then map that position back to the text in your control. Just a thought.