به نام خدا سلام بر برنامه نویسان عزیز 😉 در این مطلب آموزش گرفتن نام گروه از Match با Regex در سی شارپ #C را آماده کردم. انشاالله که این آموزش برای شما مفید باشد.
کد گرفتن نام گروه از Match با Regex در سی شارپ #C :
using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"(\d+)*(\w)\2";
string input = "AA";
Match match = Regex.Match(input, pattern);
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"(\d+)*(\w)\2";
string input = "AA";
Match match = Regex.Match(input, pattern);