JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 18.12.2018, 18:25
djmakinera djmakinera is offline
JD Legend
 
Join Date: May 2010
Location: Poland
Posts: 8,056
Default How to find a range of numbers?

Special regex with search range.

How to find a range of numbers, example:

148059159_(\d+) to 311555628 OR 311555628_(\d+)
Reply With Quote
  #2  
Old 20.12.2018, 11:32
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 62,527
Default

Please google for this, for example
regular-expressions.info/numericranges.html
__________________
JD-Dev & Server-Admin
Reply With Quote
  #3  
Old 20.12.2018, 14:18
djmakinera djmakinera is offline
JD Legend
 
Join Date: May 2010
Location: Poland
Posts: 8,056
Default

I tested and it does not work properly for me:

Find:
(148059159|1480591[6-9][0-9]|148059[2-9][0-9]{2}|1480[6-9][0-9]{4}|148[1-9][0-9]{5}|149[0-9]{6}|1[5-9][0-9]{7}|2[0-9]{8}|30[0-9]{7}|310[0-9]{6}|311[0-4][0-9]{5}|3115[0-4][0-9]{4}|31155[0-4][0-9]{3}|311555[0-5][0-9]{2}|3115556[01][0-9]|31155562[0-8])
Reply With Quote
  #4  
Old 20.12.2018, 15:20
djmakinera djmakinera is offline
JD Legend
 
Join Date: May 2010
Location: Poland
Posts: 8,056
Default

Not working.

Parse Into Range:
148059159 - 148059159
148059160 - 148059199
148059200 - 148059999
148060000 - 148099999
148100000 - 148999999
149000000 - 149999999
150000000 - 199999999
200000000 - 299999999
300000000 - 309999999
310000000 - 310999999
311000000 - 311499999
311500000 - 311549999
311550000 - 311554999
311555000 - 311555599
311555600 - 311555619
311555620 - 311555628
Parse Into Block Regex:
148059159
1480591[6-9][0-9]
148059[2-9][0-9]{2}
1480[6-9][0-9]{4}
148[1-9][0-9]{5}
149[0-9]{6}
1[5-9][0-9]{7}
2[0-9]{8}
30[0-9]{7}
310[0-9]{6}
311[0-4][0-9]{5}
3115[0-4][0-9]{4}
31155[0-4][0-9]{3}
311555[0-5][0-9]{2}
3115556[01][0-9]
31155562[0-8]
Combining Into Regex Pattern:
^0*(148059159|1480591[6-9][0-9]|148059[2-9][0-9]{2}|1480[6-9][0-9]{4}|148[1-9][0-9]{5}|149[0-9]{6}|1[5-9][0-9]{7}|2[0-9]{8}|30[0-9]{7}|310[0-9]{6}|311[0-4][0-9]{5}|3115[0-4][0-9]{4}|31155[0-4][0-9]{3}|311555[0-5][0-9]{2}|3115556[01][0-9]|31155562[0-8])$
Reply With Quote
  #5  
Old 28.12.2018, 14:36
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 62,527
Default

Quick test on regex101.com works fine here
__________________
JD-Dev & Server-Admin
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 12:37.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.