Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Map usernames from domain\username format to username@domain.com format
//Title of this code //Rextester.Program.Main is the entry point for your code. Don't change it. using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { //Your code goes here var matcher = new Regex(@"([^\\]+)\\(.+)$"); var username = @"exprosoft\dag_evry"; var result = matcher.Match(username); Console.WriteLine("Captures:"); foreach(var match in result.Captures){ Console.WriteLine(match); } Console.WriteLine(); Console.WriteLine("Groups:"); foreach(var match in result.Groups){ Console.WriteLine(match); } Console.WriteLine(); Console.WriteLine("Mapped result:"); Console.WriteLine(string.Format("{0}@{1}.com", result.Groups[2], result.Groups[1])); } } }
run
|
edit
|
history
|
help
0
C# get decimal part only form double extension
convert a string of numbers to a list then use a forEach to loop through the list
Print All Cards
sadfghjklö
what do i wrong
Exemplu OOP inventar
ConvertDotNetGuidToOracleGuid
Daimone
Types
project euler 13, C#