Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Kumaran-RegText-CityStatePostalCode Parsing
//Rextester.Program.Main is the entry point for your code. Don't change it. //Microsoft (R) Visual C# Compiler version 2.9.0.63208 (958f2354) using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { var inpt = @"Port Washington, CA 922"; var ptrn = @"^([\w\s]+(?:,|\s))\s*(\w{2})\s(\d{3,}$)|^(\w{2})\s(\d{3,}$)"; var rgx = new Regex(ptrn); Match match = rgx.Match(inpt); if (match.Success) { string v = match.Groups[1].Value; Console.WriteLine("Between One and Three: {0}", v); } } } }
run
|
edit
|
history
|
help
0
test
Finonacci Series
convert a string of numbers to a list then use a forEach to loop through the list
asfdfsafasfsa
Необязательные аргументы
jkloikujyt5r4e3wsxdf
New easy way to start lightweight threads
Non-User input - Random Controlled - Guessing Game
Find Largest Number
Hex_Base64