Skip to content

Commit

Permalink
Fix manual signal parsing detecting "CR" in the middle of system names
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperManifolds committed Sep 16, 2022
1 parent 05ff760 commit e1acdac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/mechasqueak/RescueBoard/SignalScanner.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import Regex
struct SignalScanner {
private static let platformExpression = "\\b(?:platform(?:\\: )?)?\\b(pc|xbox one|xbox|xb1|xb|playstation(?: 4)?|ps4|ps5|ps)\\b".r!
private static let systemExpression = "\\b(?:system(?:\\: )?)?([A-Z][A-Za-z0-9- ]+)\\b".r!
private static let oxygenExpression = "\\b(?:(?:o2|oxygen)(?:\\:)? )?(ok|not ok|code red|cr)\\b".r!
private static let oxygenExpression = "(?:^|\\s|$)(?:(?:o2|oxygen)(?:\\:)? )?(ok|not ok|code red|cr)(?:^|\\s|$)".r!
private static let expansionExpression = "\\b(horizons 3|horizons 4|odyssey| horizons 3.8|horizons 4.0)\\b".r!

var system: String?
Expand Down

0 comments on commit e1acdac

Please sign in to comment.