Hi Mark,
30 dec 2006 kl. 00.27 skrev Mark Nutter:
--- Peter Karlsson <[EMAIL PROTECTED]> wrote:
Hi,
Is there a way to get RegEx to give the character position of a
result as instr do? I've played with SubExpressionStartB but it
only
gives byte positions and that's not enough to select a word in
an
editfield if there's umlauts.
There's a feature request for this:
http://www.realsoftware.com/feedback/viewreport.php?reportid=ayizdwed
I've added it to my watchlist.
question 2:
is
rx.SearchPattern = "(\W)" + search + "(\W)"
the best pattern to find a word?
Depends on what you mean by "best". Not to be flippant, but the
RegEx engine has its own idea of what a "word" is, which may not
match your idea. For general purposes, the \b wildcard works
well as a word boundary marker, since it also matches beginning
or end of line as a word boundary, which \W won't.
I switched to \b and it seems to work very well, as do the workaround
for SubExpressionStartB. Thanks everybody who helped.
Peter
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>