To extract multiple items from text using a single regular expression, create a regular expression with named patterns, for example, IPAddr, Day, etc. (see below). The Discard named pattern specifies items that are not used. Then use the Regex Match property to extract the item corresponding to the named pattern from the results:
String Pattern = @"(?[\S]+)(? [\s-\[]*)(? \d{1,2})(? /)(? [a-zA-Z]+)(? /)(? \d{2,4})(? :)(? \d{1,2})(? :)(? \d{1,2})(? :)(? \d{1,2})(? [\s]*)(? [\+\-]*\d{2})(? \d{2})(? ([\]\s])*""(GET|HEAD)([\s])*)(? [\S]*)(? [^""]*""[\s]*)(? [0-9]*)(? [\s]*)(? ([0-9])*)(? [^""]*"")(? [^""]*)(? [^""]*""[^""]*"")(? [^""]*)"; Regex RE = new Regex(Pattern, RegexOptions.IgnoreCase | RegexOptions.Compiled); Regex RE = new Regex(Pattern, RegexOptions.IgnoreCase | RegexOptions.Compiled); ... String Line = SR.ReadLine().Trim(); ... Match M = RE.Match(Line); Item.IPAddress = M.Result("${IPAddr}"); int Day = Int32.Parse(M.Result("${Day}"));
| Title | Date |
| Raspberry Pi Camera Trap and Animal Detection Program | August 13, 2026 |
| Python Tip: Fix Incorrect Orientation of Digital Photos | August 8, 2026 |
| EBT Weather is now available for Windows and Linux | May 30, 2026 |
| Node.js + Express: How to Block Requests by User-Agent Headers | January 7, 2026 |
| Vault 3 is Now Available for Windows on ARM Machines! | December 13, 2025 |
| Vault 3: How to Include Outline Text in Exported Photos | October 26, 2025 |
| .NET Public-Key (Asymmetric) Cryptography Demo | July 20, 2025 |