/
aprogrammer
/
dotnet-docs
Обзор
Документация
Войти
/
aprogrammer
/
dotnet-docs
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
docs/fundamentals/runtime-libraries/snippets/System.Text.RegularExpressions/Regex/Match/csharp/startat.cs
20 строк
490 B
Genevieve Warren
Move member remarks (#39270)
30 янв 2024, 00:43
Не верифицирован
30 янв 2024, 00:43
6c88824
Код
Авторство
О чём код?
using System; using System.Text.RegularExpressions; namespace Examples { public class Example3 { public static void Main() { string input = "Zip code: 98052"; var regex = new Regex(@"(?<=Zip code: )\d{5}"); Match match = regex.Match(input, 5); if (match.Success) Console.WriteLine("Match found: {0}", match.Value); } } } // This code prints the following output: // Match found: 98052