Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Fórum regex only alphanumerics (except underscore)
//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; // aljodav // http://rextester.com/users/376 namespace Rextester { public class Program { public static void Main(string[] args) { Match m1=Regex.Match("123ab456_",@"\W|_|^$"); bool onlyAlphaNumerics1=!m1.Success; // False Match m2=Regex.Match("123ab456@",@"\W|_|^$"); bool onlyAlphaNumerics2=!m2.Success; // False Match m3=Regex.Match("",@"\W|_|^$"); bool onlyAlphaNumerics3=!m3.Success; // False Match m4=Regex.Match("123ab456AB",@"\W|_|^$"); bool onlyAlphaNumerics4=!m4.Success; // True Console.WriteLine(onlyAlphaNumerics1); Console.WriteLine(onlyAlphaNumerics2); Console.WriteLine(onlyAlphaNumerics3); Console.WriteLine(onlyAlphaNumerics4); } } }
run
|
edit
|
history
|
help
0
sdsadxaxsd
Code which will convert Word into its Binary Format
Fórum Multiple Tests Returning Error Message
My_Response
Raise Meldings logikk
ExtensionDateTime
Order of Ops 5 (easier)
Des encryption
smallestof3
c++online