realbasic-nug
[Top] [All Lists]

Re: RegEx searching

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: RegEx searching
From: Sven E Olsson <lists at seedit dot info>
Date: Fri, 29 Dec 2006 22:37:52 +0100
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <62959319-CCE1-454D-B9CA-EC300FFEDE7D at redpro dot se>

On 2006-12-29, at 22:27, Peter Karlsson 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.

question 2:
is
rx.SearchPattern = "(\W)" + search + "(\W)"
the best pattern to find a word?

Best,

Peter Karlsson
_______________________________________________


1)
charPos = Len( LeftB(TextWindow(window(i)).TextField.Text, FoundResult.SubExpressionStartB(0)) ) FindRegEx.NextPos = FoundResult.SubExpressionStartB(0) + lenB (FoundResult.SubExpressionString(0))


Sven E
_______________________________________________
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>


<Prev in Thread] Current Thread [Next in Thread>