Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
SpiltStringBetweenSpecialCharacters
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { string tempaddress = "303!<>!|!<>!203"; char[] c = tempaddress.ToCharArray(); string First=""; for(int i=0;i<c.Length;i++) { if(Char.IsLetterOrDigit(c[i])) { First = First + c[i]; } else { break; } } Console.WriteLine(First); string address = Regex.Replace(tempaddress, @"[^0-9a-zA-Z]+", ""); Console.WriteLine(address); Console.WriteLine(address.Replace(First,"")); } } }
run
|
edit
|
history
|
help
0
Math 5.81
D18
Concurrent bag ex
19.05.2020
(Sort)Rounding Magic - C#
sdcsvdfcsc
Planet-D
5555555
27
utf-8 string to bytes and back