Skip to content

Commit

Permalink
Merge pull request #324 from GeoffTK/fix-android-parsing
Browse files Browse the repository at this point in the history
Update Android Regex to allow for single digit OS versions
  • Loading branch information
commenthol authored Sep 14, 2018
2 parents a537607 + 5efbdcc commit aa82669
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion regexes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ os_parsers:
# Android
# can actually detect rooted android os. do we care?
##########
- regex: '(Android)[ \-/](\d+)\.(\d+)(?:[.\-]([a-z0-9]+))?'
- regex: '(Android)[ \-/](\d+)\.?(\d+)?(?:[.\-]([a-z0-9]+))?'

- regex: '(Android) Donut'
os_v1_replacement: '1'
Expand Down
7 changes: 7 additions & 0 deletions tests/test_os.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2637,3 +2637,10 @@ test_cases:
patch:
patch_minor:

- user_agent_string: 'Mozilla/5.0 (Linux; Android 9; Pixel Build/PPP3.180510.008) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.81 Mobile Safari/537.36'
family: 'Android'
major: '9'
minor:
patch:
patch_minor:

0 comments on commit aa82669

Please sign in to comment.