Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Parser): remove redundant nested repeat operator and escape bracket #90

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions regexes/client/browsers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1470,7 +1470,7 @@
version: '$1'

# QQ Browser Mini
- regex: 'M?QQBrowser/Mini([\.\d]+)?'
- regex: 'M?QQBrowser/Mini([\.\d]*)'
name: 'QQ Browser Mini'
version: '$1'
engine:
Expand Down Expand Up @@ -2266,7 +2266,7 @@
version: '$1'

# MAUI Wap Browser
- regex: 'WAP Browser/MAUI|(?:\w+)?Maui Wap Browser|MAUI[- ]Browser'
- regex: 'WAP Browser/MAUI|(?:\w*)Maui Wap Browser|MAUI[- ]Browser'
name: 'MAUI WAP Browser'
version: ''

Expand Down
2 changes: 1 addition & 1 deletion regexes/client/libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
name: 'aiohttp'
version: '$1'

- regex: 'Google-HTTP-Java-Client(?:/(\d+[\.\d\w-]+))?'
- regex: 'Google-HTTP-Java-Client(?:/(\d+[\.\w-]+))?'
name: 'Google HTTP Java Client'
version: '$1'

Expand Down
4 changes: 2 additions & 2 deletions regexes/client/mediaplayers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,15 @@
name: 'mpv'
version: '$1'

- regex: 'foobar2000(?:/([\d\w_\.]+))?'
- regex: 'foobar2000(?:/([\w\.]+))?'
name: 'foobar2000'
version: '$1'

- regex: 'HTC Streaming Player'
name: 'HTC Streaming Player'
version: ''

- regex: 'MediaGo(?:/([\d\w_\.]+))?'
- regex: 'MediaGo(?:/([\w\.]+))?'
name: 'Sony Media Go'
version: '$1'

Expand Down
36 changes: 18 additions & 18 deletions regexes/client/mobile_apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,13 @@
- regex: 'BeyondPod'
name: 'BeyondPod'
version:
- regex: 'AntennaPod/?([\d\.]+)?'
- regex: 'AntennaPod/?([\d\.]*)'
name: 'AntennaPod'
version: '$1'
- regex: 'Overcast/([\d\.]+)'
name: 'Overcast'
version: '$1'
- regex: '(?:CastBox|fm.castbox.audiobook.radio.podcast)/?([\d\.]+)?'
- regex: '(?:CastBox|fm.castbox.audiobook.radio.podcast)/?([\d\.]*)'
name: 'CastBox'
version: '$1'
- regex: 'Player FM'
Expand Down Expand Up @@ -176,46 +176,46 @@
- regex: 'jp.co.yahoo.android.yjtop/([\d\.]+)'
name: 'Yahoo! Japan'
version: '$1'
- regex: 'RSSRadio/([\d]+)?'
- regex: 'RSSRadio/([\d]*)'
name: 'RSSRadio'
version: '$1'
- regex: 'SogouSearch Android[\d\.]+ version([\d\.]+)?'
- regex: 'SogouSearch Android[\d\.]+ version([\d\.]*)'
name: 'SogouSearch App'
version: '$1'
- regex: 'NewsArticle/([\d\.]+)?'
- regex: 'NewsArticle/([\d\.]*)'
name: 'NewsArticle App'
version: '$1'
- regex: 'tieba/([\d\.]+)?'
- regex: 'tieba/([\d\.]*)'
name: 'tieba'
version: '$1'
- regex: 'com\.douban\.group/([\d\.]+)?'
- regex: 'com\.douban\.group/([\d\.]*)'
name: 'douban App'
version: '$1'
- regex: 'BingWeb/([\d\.]+)?'
- regex: 'BingWeb/([\d\.]*)'
name: 'BingWebApp'
version: '$1'
- regex: '(?:com.google.GoogleMobile|GSA)/([\d\.]+)?'
- regex: '(?:com.google.GoogleMobile|GSA)/([\d\.]*)'
name: 'Google Search App'
version: '$1'
- regex: 'Flipboard/([\d\.]+)?'
- regex: 'Flipboard/([\d\.]*)'
name: 'Flipboard App'
version: '$1'
- regex: 'Instagram[ /]([\d\.]+)?'
- regex: 'Instagram[ /]([\d\.]*)'
name: 'Instagram App'
version: '$1'
- regex: 'baiduboxapp/([\d\.]+)?'
- regex: 'baiduboxapp/([\d\.]*)'
name: 'Baidu Box App'
version: '$1'
- regex: 'Crosswalk(?!.*(?:Streamy|QwantMobile))/([\d\.]+)?'
- regex: 'Crosswalk(?!.*(?:Streamy|QwantMobile))/([\d\.]*)'
name: 'CrosswalkApp'
version: '$1'
- regex: 'Twitter for iPhone[/]?([\d\.]+)?'
- regex: 'Twitter for iPhone[/]?([\d\.]*)'
name: 'Twitter'
version: '$1'
- regex: 'Twitter/([\d\.]+)'
name: 'Twitter'
version: '$1'
- regex: 'TwitterAndroid[/]?([\d\.]+)?'
- regex: 'TwitterAndroid[/]?([\d\.]*)'
name: 'Twitter'
version: '$1'
# Pocket Casts (https://pocketcasts.com)
Expand Down Expand Up @@ -296,7 +296,7 @@
name: 'Kik'
version: '$1'

- regex: 'Procast/?([\d\.]+)?'
- regex: 'Procast/?([\d\.]*)'
name: 'Procast'
version: '$1'

Expand Down Expand Up @@ -477,10 +477,10 @@
version: '$1'

# TuneIn Radio Pro
- regex: 'TuneIn Radio Pro(?:[^/]+)?/(\d+[\.\d]+)'
- regex: 'TuneIn Radio Pro(?:[^/]*)/(\d+[\.\d]+)'
name: 'TuneIn Radio Pro'
version: '$1'
- regex: 'TuneIn(?: Radio(?:[^/]+)?)?/(\d+[\.\d]+)'
- regex: 'TuneIn(?: Radio(?:[^/]*))?/(\d+[\.\d]+)'
name: 'TuneIn Radio'
version: '$1'

Expand Down
12 changes: 6 additions & 6 deletions regexes/device/mobiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1608,7 +1608,7 @@ Arian Space:

# Alcatel (alcatelmobile.com)
Alcatel:
regex: 'Alcatel|Alc(?!or )[a-z0-9]+|One[ _]?Touch|idol3|TIMXL|(?:(?:4003[AJ]|4009[ADEFIKMSX]|4013[DEJKMX]|4014[ADEKMX]|4015[ADNTX]|4016[ADX]|4017[ADEFSX]|4018[ADEFMX]|4024[EDX]|4027[ADNX]|4028[AEJS]|4032[ADEX]|4034[ADEFGXTL]|4035[ADXY]|4045[ADEXL]|4047[ADFGNX]|4049[DEGMX]|4060[SW]|A466BG|A621BL|4114E|4087U|5001[ADJTU]|5002[ADFH]|5003[ADGU]|5006D|5007[AU]|5008[ADUYT]|5009[AD]|5010[DEGSUX]|5011A|5012[DFG]|5015[ADEX]|5016[AXJ]|5017[ABDEOX]|5019D|5022[EDX]|5023[EF]|5024[ADJF]|5025[DEG]|5026[ADJ]|5027B|5028[AYD]|5029[EYDA]|5030[UFDE]|5032W|5033[AEFXDJGMOTXYQS]|5034D|5036D|5038[ADEX]|5039[DY]|5041[CD]|5042[ADEFGWXT]|5044[ADGIKOPSTY]|5045[ADFGIJTXY]|5046[ADGIJSTUY]|5047[DIUY]|5048[AYUI]|5049[EGSWZ]|5050[ASXY]|5051[ADEJMTWX]|5052[ADY]|5053[ADKY]|5054[ADNSTWX]|5056[ADEGIJMNTUWX]|5057M|5058[AIY]|5059[ADJXYZIST]|5060[ADJ]|5061[KU]|5065[ADNWX]|5070D|5080[ADFQUX]|5085[ABCDGHIJNOQY]|5086[ADY]|5090[AIY]|5095[IKY]|5098[OS]|5099[ADYUI]|5116J|5145A|6016[ADEX]|6025H|6036[AXY]|6037[BKY]|6039[AHJKYS]|6042D|6043[AD]|6044D|6045[BFIKOYX]|6050[AFY]|6055[ABDHIKPUYZ]|6058[ADX]|6060[SXC]|6062W|6070K|7040[ADEFKRT]|7041[DX]|7042A|7043[AEKY]|7044[AX]|7045Y|7048[ASWX]|7053D|7055A|7070X|7071[ADX]|8030Y|8050[DEGX]|8063|8088[XQM]|9001[DIX]|900[25]X|9003[AX]|9024O|9013X|9026X|9007[ATX]|9008[ADIJNTUX]|9009G|9010X|9020A|9022X|9032X|9027[QFTWX]|9029Z|9203A|A(?:464BG|570BL|50[13]DL|57[17]VL|574BL)|I213|I216[AX]|(?<!\.)80(?:82|6[78])|A576CC)(?:_(?:EEA|RU))?|P3[36]0X)(?:[);/ ]|$)'
regex: 'Alcatel|Alc(?!or )[a-z0-9]+|One[ _]?Touch|idol3|TIMXL|(?:(?:4003[AJ]|4009[ADEFIKMSX]|4013[DEJKMX]|4014[ADEKMX]|4015[ADNTX]|4016[ADX]|4017[ADEFSX]|4018[ADEFMX]|4024[EDX]|4027[ADNX]|4028[AEJS]|4032[ADEX]|4034[ADEFGXTL]|4035[ADXY]|4045[ADEXL]|4047[ADFGNX]|4049[DEGMX]|4060[SW]|A466BG|A621BL|4114E|4087U|5001[ADJTU]|5002[ADFH]|5003[ADGU]|5006D|5007[AU]|5008[ADUYT]|5009[AD]|5010[DEGSUX]|5011A|5012[DFG]|5015[ADEX]|5016[AXJ]|5017[ABDEOX]|5019D|5022[EDX]|5023[EF]|5024[ADJF]|5025[DEG]|5026[ADJ]|5027B|5028[AYD]|5029[EYDA]|5030[UFDE]|5032W|5033[AEFXDJGMOTYQS]|5034D|5036D|5038[ADEX]|5039[DY]|5041[CD]|5042[ADEFGWXT]|5044[ADGIKOPSTY]|5045[ADFGIJTXY]|5046[ADGIJSTUY]|5047[DIUY]|5048[AYUI]|5049[EGSWZ]|5050[ASXY]|5051[ADEJMTWX]|5052[ADY]|5053[ADKY]|5054[ADNSTWX]|5056[ADEGIJMNTUWX]|5057M|5058[AIY]|5059[ADJXYZIST]|5060[ADJ]|5061[KU]|5065[ADNWX]|5070D|5080[ADFQUX]|5085[ABCDGHIJNOQY]|5086[ADY]|5090[AIY]|5095[IKY]|5098[OS]|5099[ADYUI]|5116J|5145A|6016[ADEX]|6025H|6036[AXY]|6037[BKY]|6039[AHJKYS]|6042D|6043[AD]|6044D|6045[BFIKOYX]|6050[AFY]|6055[ABDHIKPUYZ]|6058[ADX]|6060[SXC]|6062W|6070K|7040[ADEFKRT]|7041[DX]|7042A|7043[AEKY]|7044[AX]|7045Y|7048[ASWX]|7053D|7055A|7070X|7071[ADX]|8030Y|8050[DEGX]|8063|8088[XQM]|9001[DIX]|900[25]X|9003[AX]|9024O|9013X|9026X|9007[ATX]|9008[ADIJNTUX]|9009G|9010X|9020A|9022X|9032X|9027[QFTWX]|9029Z|9203A|A(?:464BG|570BL|50[13]DL|57[17]VL|574BL)|I213|I216[AX]|(?<!\.)80(?:82|6[78])|A576CC)(?:_(?:EEA|RU))?|P3[36]0X)(?:[);/ ]|$)'
device: 'smartphone'
models:
- regex: '4087U'
Expand Down Expand Up @@ -1935,7 +1935,7 @@ Alcatel:
model: 'Go Flip'
- regex: '5044[GS]'
model: 'U50'
- regex: '5033[ADXJEFGMOTXYQS]'
- regex: '5033[ADXJEFGMOTYQS]'
model: '1'
- regex: '5009[AD]'
model: '1C'
Expand Down Expand Up @@ -10609,7 +10609,7 @@ LG:
model: 'Q92'
- regex: 'LM-Q927L'
model: 'Q9 One'
- regex: '(?:LG-)?(?:RS987|H90[01]|H96[02128]|VS990|F600[LK]|K428)'
- regex: '(?:LG-)?(?:RS987|H90[01]|H96[0218]|VS990|F600[LK]|K428)'
model: 'V10'
- regex: 'LG-(?:X240|M200)'
model: 'K8 (2017)'
Expand Down Expand Up @@ -19200,7 +19200,7 @@ Xiaomi:
# general detections
- regex: 'MI[- ]One[ _]?Plus(?:[);/ ]|$)'
model: 'Mi One Plus'
- regex: 'Mi[- ]One[ _]?([a-z0-9]+)?(?: Build|[);]])'
- regex: 'Mi[- ]One[ _]?([a-z0-9]+)?(?: Build|[);\x5d])'
model: 'Mi One $1'
- regex: 'MI[ _]([^;/]*) Build'
model: 'Mi $1'
Expand Down Expand Up @@ -22746,7 +22746,7 @@ Beelink:

# MAXVI
MAXVI:
regex: 'MAXVI[ _](?:MS401)(?:[);/ ]|$)|(?:\w+)?_MAXVI_\w+|MS502[_ ]Orion|MS531'
regex: 'MAXVI[ _](?:MS401)(?:[);/ ]|$)|(?:\w*)_MAXVI_\w+|MS502[_ ]Orion|MS531'
device: 'smartphone'
models:
- regex: 'MAXVI[ _](MS401)'
Expand All @@ -22755,7 +22755,7 @@ MAXVI:
model: 'MS531 Vega'
- regex: 'MS502[_ ]Orion'
model: 'MS502 Orion'
- regex: '(?:\w+)?MAXVI_(P11|K10|X[358]00)_\w+'
- regex: '(?:\w*)MAXVI_(P11|K10|X[358]00)_\w+'
device: 'feature phone'
model: '$1'

Expand Down
6 changes: 3 additions & 3 deletions regexes/oss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,11 @@
##########
# Android
##########
- regex: '(?:Podbean|Podimo)(?:.+)?/Android'
- regex: '(?:Podbean|Podimo)(?:.*)/Android'
name: 'Android'
version: ''

- regex: 'Pinterest for Android/.+; (\d(?:[\d\.]+)?)\)$'
- regex: 'Pinterest for Android/.+; (\d(?:[\d\.]*))\)$'
name: 'Android'
version: '$1'

Expand Down Expand Up @@ -458,7 +458,7 @@
name: 'iOS'
version: '$1.$2'

- regex: 'Pinterest for iOS/.+; (\d(?:[\d\.]+)?)\)$'
- regex: 'Pinterest for iOS/.+; (\d(?:[\d\.]*))\)$'
name: 'iOS'
version: '$1'

Expand Down