Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Testing 10
//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 = "A203"; 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])?$"; //string pattern = @"^[0-1]+$"; // Número Binario string pattern = @"^[0-9]+$"; // Número Decimales 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
testing
单链表
Overloading == operator (for comparing values inside objects)
Interface
extension methods
Singletone Class
Math 10.5 (Added simult 4x4)
Frase
Validate or get the check digit of a segment of a Windows 8 / 10 activation installation ID
Square Integer Matrix