4DQuiz


QF_REExtractText View from small screen devices!  

QFree 2.1Regex commands

QF_REExtractText

QF_REExtractText(patternText; targetText; groupsToExtract; extractedMatches; regexFlags):result
patternText Text Regular expression
targetText Text Target text
groupsToExtract Text Group numbers to extract
extractedMatches Array text Array of extracted segments
regexFlags Longint Regular expression flags
error Longint Error result

Extracts all matches of a regular expression against a text variable.

Parameter patternText is the regular expression to be matched.

Parameter targetText is the target text variable.

Parameter groupsToExtract specifies the groups to be extracted. If it is empty or "0", only the whole pattern matches are extracted. If the pattern contains grouping parentheses, the groupsToExtract can be a list of group numbers to be extracted. For example, by specifing "2 1", all matches of the second and first sub-pattern will be extracted in the specified order. QFree uses the "\d+" pattern internally to extract the group numbers from the groupsToExtract string.

Parameter extractedMatches receives the pattern matches. Depending on the groups specified in groupsToExtract, this parameters can be:

Parameter regexFlags specifies a set of flags that control the matching operation. Use the regex options constants by combining them with bitwise "or".
QFree © Escape Information Services
Generated by QDoc 2.7 on Fri, Sep 26, 2003 01:06:32


Topics of Interest
QFree 2.1
Regular Expressions
 

Published date: Tue, 12 Sep 2006 20:08:12 GMT   → View XML Version
Edit this page now

© 2005 - 2006 4dquiz.com, All trademarks accepted. All Rights Reserved!
Site Index