ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / String functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Searches for all the parts of a string that match a specific format.
Note: The grammar used for regular expressions is ECMAScript.
Example
// On recherche toutes les dates dans une chaîne 
// et on récupère les jours, les mois et les années.
sChaîne is string = "La commande sera livrée entre le 28/08/2024 et le 02/09/2024."
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
TXT_Résultat is 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>: entier
Number of strings found.
<Source string>: Character string
String in which the search will be performed.
<Format>: Character string
Regular expression that indicates the format of the part of the string to search for in <Source string>.
<Strings found>: Array of strings
Name of the Array of strings variable that will contain the different substrings in <Source string>.
<Strings found N>: Optional array of strings
Name of the Array of strings variable that will contain the different substrings in <Source string>.
Business / UI classification: Neutral code
Component: wd300std.dll
Minimum version required
  • Version 27
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/28/2025

Send a report | Local help