Navigation:  thinBasic Modules > Core > String handling >

REGEXPR$

Previous pageReturn to chapter overviewNext page

 

Description

 

Scan a string for a matching "wildcard" or regular expression.

 

Syntax

 

s = REGEXPR$(sMask, sMain, nStart, nVarPos, nVarLen)

 

Returns

 

String

 

Parameters

 

Name

Type

Optional

Meaning

sMask

String

No

Matching expression

sMain

String

No

String to scan

nStart

Numeric

No

Starting position

nVarPos

Variable

No

Numeric variable passed BYREF that will contain starting position of the matching string

nVarLen

Variable

No

Numeric variable passed BYREF that will contain the length of the matching string

 

Remarks

 

REGEXPR$ scans sMain for a matching expression specified in sMask.  If found, it returns the position of the match in the nVarPos variable (indexed to the first character position), and the length of the matching expression in nVarLen.

 

Restrictions

 

See also

 

String Handling,

 

Examples

 

 

 

 

 

© 2004-2008 thinBasic. All rights reserved. Version 1.7.0.0 Web Site: http://www.thinbasic.com