سلام بر تمامی برنامه نویسان #C 😉 در این مطلب کد Reverse (معکوس کردن) رشته با Regex در c#.net را آماده کردم. امیدوارم که این کد برای شما مفید باشد.
خروجی پروژه:
1.123.168.192 (the reverse of 192.168.123.1)
کد Reverse (معکوس کردن) رشته با Regex در c#.net :
using System;
using System.Text;
using System.Text.RegularExpressions;
public class MainClass
{
static void Main( string[] args ) {
// Create regex to search for IP address pattern.
string pattern = @"(?<part1>[01]?\d\d?|2[0-4]\d|25[0-5])\." +
@"(?<part2>[01]?\d\d?|2[0-4]\d|25[0-5])\." +
using System.Text;
using System.Text.RegularExpressions;
public class MainClass
{
static void Main( string[] args ) {
// Create regex to search for IP address pattern.
string pattern = @"(?<part1>[01]?\d\d?|2[0-4]\d|25[0-5])\." +
@"(?<part2>[01]?\d\d?|2[0-4]\d|25[0-5])\." +