Condividi tramite


Regular Expressions Foundation Class

Category System Utilities
Default Catalog Visual FoxPro Catalog\Foundation Classes\Utilities
Class _regexp
Base Class Custom
Class Library _regexp.vcx
Parent Class _custom
Sample ...\Samples\Solution\Ffc\Regexp.scx

Remarks

Regular Expressions are a concise and flexible notation for finding and replacing patterns of text. This class gives you access to routines for using Regular Expressions in your applications. Refer to the following documents for details on using Regular Expressions:

Tips \Samples\Solution\Ffc\regexp1.htm
Reference \Samples\Solution\Ffc\regexp2.htm

You can also refer to MSDN for more details on Regular Expressions in general.

To use, drop the class on a project or form or, from the Component Gallery Item Shortcut Menu, select Add to Project or Add to Form. When you add the class to a form, Visual FoxPro places the class icon on the form. You can specify the appropriate property values and provide any necessary input and output objects. When you drop the class on a project, you can choose between adding the class or creating a subclass.

See Guidelines for Using Visual FoxPro Foundation Classes for more information on using foundation classes.

Properties, Events, Methods Description
Matches array Specifies the array containing the results of the string test.

Default: .F.

Pattern property Contains the pattern (regular expression).

Default: *

Clear method Clears all values.

Syntax: Clear( )

Return: none

Arguments:

Execute method Tests the pattern against the string.

Syntax: Execute(tcStr, tlCaseMatters)

Return: number of matches

Arguments:

tcStr specifies string to search.

tlCaseMatters specifies whether to ignore case.

See Also

Guidelines for Using Visual FoxPro Foundation Classes | Visual FoxPro Foundation Classes A-Z | Visual FoxPro Foundation Classes