QMMatchfield() |
|
|
The QMMatchfield() function matches a character string against a pattern template and extracts the part corresponding to a specified pattern component. It is analogous to the QMBasic MATCHFIELD() function.
Format
where
The QMMatchfield() function matches Src against the Pattern template as described for the QMMatch() function. If the string matches, the portion corresponding to the specified Component is returned. If the string does not match the pattern, a null string is returned.
Examples
The above example returns the alphabetic prefix of a value stored in PartCode if it is formed from between two and four letters followed three digits.
Note that Prefix variable in the C example points to dynamically a allocated memory area that must be released using QMFree() when no longer needed.
This function is evaluated on the client system and does not require a server connection to be open.
|