Regex (C#)
Në shqip: Shprehjet e rregullta në C#
ShpjegimiSQ
Klasa Regex kontrollon dhe gjen modele teksti: Regex.IsMatch(email, @"^\S+@\S+$"). Në .NET 7+, [GeneratedRegex] e kompajlon regex-in për shpejtësi maksimale.
EnglishEN
The Regex class checks and finds text patterns: Regex.IsMatch(email, @"^\S+@\S+$"). In .NET 7+, [GeneratedRegex] compiles the regex for maximum speed.
Si ta mendosh
Si një sitë që lë të kalojnë vetëm format e duhura.
Lexoje në anglisht
Like a sieve that lets only the right shapes through.
Shembull kodicsharp
bool ok = Regex.IsMatch(tel, @"^\+383\d{8}$");