From 60687a049d091756846f739b5ccb9fad6241ef98 Mon Sep 17 00:00:00 2001 From: James Brundage Date: Sun, 22 Sep 2024 05:34:05 +0000 Subject: [PATCH] fix: Generating .regex.txt files ( Fixes #235, Fixes #236 ) --- RegEx/Unix/Conf_Line.regex.txt | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/RegEx/Unix/Conf_Line.regex.txt b/RegEx/Unix/Conf_Line.regex.txt index 8e6bfdb..820d165 100644 --- a/RegEx/Unix/Conf_Line.regex.txt +++ b/RegEx/Unix/Conf_Line.regex.txt @@ -1,9 +1,12 @@ # Matches Lines in a .conf or .ini file. -(?m) # Set Multiline mode +(?m) # Set Multiline mode # A Configuration line can either be a comment line, a blank line, or a line with a value -(^[\;\#](?(?:.|\s){0,}?(?=\z|$)) # Lines that start with ; or are comments -|^\s+$ # Blank lines will also match, but not be captured -|(?^[\w\s\.\-]+) # Otherwise, the first word is the name -\s?(?[\=\:]) # Followed by an equals or colon (surrounded by optional whitespace) -\s?(?(?:.|\s){0,}?(?=\z|$)) # Anything until the end of line is the value -|(?^.$)) +(?:^[\;\#](?(?:.|\s){0,}?(?=\z|$)) # Lines that start with ; or are comments +| +^\s+$ # Blank lines will also match, but not be captured +| +(?^[\w\s\.\-]+) # Otherwise, the first word is the name +\s?(?[\=\:]) # Followed by an equals or colon (surrounded by optional whitespace) +\s?(?(?:.|\s){0,}?(?=\z|$)) # Anything until the end of line is the value +| +(?^.$))