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 a1e53fe commit 06c489a
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions RegEx/Degrees.regex.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Matching degrees
(?<Decimals>
(?<IsNegative>\-)? # It might be start with a -
(?:(?> # Then it can be either:
(?<Characteristic>\d+) # One or more digits (the Characteristic)
(?:\.(?<Mantissa>\d+)){0,1} # followed by a period and one or more digits (the Mantissa)
| # Or it can be
(?:\.(?<Mantissa>\d+)) # just a Mantissa
))
(?:
E
(?<Exponent>
[+-]\d+
)
)?
)
\s{0,} # Optional Whitespace
(?>
Degrees |
Degree |
°) # Degree(s) or the degree symbol
\s{0,} # Optional Whitespace
(?<UnitType>(?>
Celsius |
C |
Fahrenheit |
F))? # Optional unit

0 comments on commit 06c489a

Please sign in to comment.