-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|