Read Me - Common Public License V1.0 - Copyright Notice(©)

position


>>-position------------------------------------------------><

Returns the character position at which the last parse(), pos(), or match() method ended.

Class REGULAREXPRESSION - position method


myRE = .RegularExpression~new
myRE~parse("[abc")                    -- illegal set definition
say myRE~position                     -- will be 4

myRE = .RegularExpression~new("[abc]12")
myRE~match("c12")
say myRE~position                     -- will be 3

myRE~match("a13")
say myRE~position                     -- will be 2 (failure to match)

::requires "rxregexp.cls"

Read Me - Common Public License V1.0 - Copyright Notice(©)