|
|
|
|
RegexSearch (Function) In french: RegexCherche Searches for all the parts of a string that match a specific format. Remark: The specification used for regular expressions is ECMAScript.
sChaîne is string = "La commande sera livrée entre le 28/08/2020 et le 02/09/2020."
nTrouvée is int = 0
tabDate is array of string
tabJours is array of string
tabMois is array of string
tabAnnées is array of string
nTrouvée = RegexSearch(sChaîne, "([0-9]{1,2})/([0-9]{1,2})/([0-9]{4})", ...
tabDate, tabJours, tabMois, tabAnnées)
FOR i = 1 TO nTrouvée
TXT_Résultat += StringBuild("Date: %1 | Jours: %2 | Mois: %3 | Années: %4", ...
tabDate[i], tabJours[i], tabMois[i], tabAnnées[i])
TXT_Résultat += CR
END
Syntax
<Result> = RegexSearch(<Source string> , <Format> , <Strings found> ... [, <Strings found N>])
<Result>: Integer Number of strings found. <Source string>: Character string String in which the search will be performed. <Format>: Character string Regular expression indicating the format of the part of the string to search in . <Strings found>: Array of strings Name of the Variable type Array of strings that will contain the various substrings found in . <Strings found N>: Optional array of strings Name of the Variable type Array of strings that will contain the various substrings found in . Business / UI classification: Neutral code
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|