I have a document with various indicators like <Gen 1:1> or <Gén 1:10> I normally can search the plain text of the document with regex.
However, I need to use this information to set a check point.
So basically I need to take the plain unicode text find the information example <Gen 1:1> then jump over to the same information in the RichViewEdit and set a checkpoint on <Gen 1:1>
I know I could use RichViewEdit.SearchTextW but I need to search for like <.*? \d+:\d+(-\d+:\d+|-\d+|)> since there are various ways these references can be entered and in unicode which SearchTextW is not a regex searcher (yet).
Any recommendations, ideas?
Plain Text Position to SetCurrentSelection
-
- Site Admin
- Posts: 17555
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Plain Text Position to SetCurrentSelection
You can use functions from RVLinear unit.
RVGetTextRange returns text that has 1:1 correspondence to TRichView document.
And there are examples that use this function + regexp: https://www.trichview.com/forums/viewto ... f=3&t=9278
RVGetTextRange returns text that has 1:1 correspondence to TRichView document.
And there are examples that use this function + regexp: https://www.trichview.com/forums/viewto ... f=3&t=9278