Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Exemple Regex
//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) { //^ patró $ això fa que busqui estrictament el patró i no subcadenes //(?i) no diferencia entra majúscules i minúscules. Per defecte es case sensitive. Es pot fer un rango posant (?-i) patró (?i) //En c# no funciona \d per a dígits ni \w per a paraules, s'ha de posar [0-9] i [a-z] respectivament //L'exemple següent Segueix el patró: 4 digits + N lletres + 4 digits estrictament i no es case sensitive Console.WriteLine((new Regex("(?i)^[0-9]{4}[A-Z]+[0-9]{4}$").IsMatch("1234WWW1234"))); } } }
run
|
edit
|
history
|
help
0
Cs
Regex fórum 01
decimal to binary
Lesson 1.2 Part II
Sort example
ReplaceNotExpectedCharacters
recur 4
C# program to Determine if Two Words Are Anagrams of Each Other
circular linked list
Finding a Substring in a Main String