Skip to content

Commit

Permalink
fix: Generating .regex.txt files ( Fixes #235, Fixes #236 )
Browse files Browse the repository at this point in the history
  • Loading branch information
James Brundage authored and James Brundage committed Sep 22, 2024
1 parent 1011278 commit 48ad865
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions RegEx/C/Define.regex.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Matches C/C++ #define
# Matches C/C++ #define
(?m)\#\s{0,}
define # Match the define
\s+ # Whitespace
(?<Identifier>\w+) # The identifier
\s{0,} # Optional Whitespace
define # Match the define
\s+ # Whitespace
(?<Identifier>\w+) # The identifier
\s{0,} # Optional Whitespace
# Then either
(?>(?<Definition>([^\\]+$ # A Line with no escape OR
|(?<Line>[^\\]+?\\(?=(?>\r\n|\n))) # One or more lines ending with \
{1,})))
(?>
(?<Definition>[^\\]+$ # A Line with no escape OR
|
(?<Line>[^\\]+?\\(?=(?>\r\n|\n))) # One or more lines ending with \
{1,}))

0 comments on commit 48ad865

Please sign in to comment.