Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Testing 9
//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 pattern = "(Mr\\.? |Mrs\\.? |Miss |Ms\\.? )"; //string[] names = { "Mr. Henry Hunt", "Ms. Sara Samuels", "Abraham Adams", "Ms. Nicole Norris" }; //foreach (string name in names) //Console.WriteLine(Regex.Replace(name, pattern, String.Empty)); string numero = "101010001"; var Characters = @"/[`~!@#$%^&*()_|+\-=?;:',.<>\{\}\[\]\\\/]/gi"; //string cadena = Regex.Replace(numero, Characters, String.Empty); string cadena = numero.Replace(Characters, String.Empty).Trim(); string pattern = @"^[0-1](\.[a-zA-Z])?$"; Regex Val = new Regex(pattern); if(Val.IsMatch(numero)) { Console.WriteLine("El Número: {0}",numero+" es Binario."); } else { Console.WriteLine("El Número no es Binario."); } } } }
run
|
edit
|
history
|
help
0
Метод catch b try в словарях
Value Type vs Ref Type
Greatest Common Divisor of 2 or more numbers.
Add char to non-numerical words only
Code1
Robot_Testing
csharp enum
xx
Saga name NLog
Fibonacci Series