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
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
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.
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/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
Component: wd290std.dll
Minimum version required
  • Version 27
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 04/10/2024

Send a report | Local help