JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 22.05.2019, 16:36
djmakinera djmakinera is offline
Banned
 
Join Date: May 2010
Location: Poland
Posts: 8,387
Default How do find a separate number of characters?

How do find a separate number of characters?

Incorrect pattern because it matches all characters!



Spoiler:
={1,3}?

Non-Greedy n through m
{x,y} = match the preceding element x - y times.
1 is the minimum number of characters to match.
3 is the maximum number of consecutive characters to match.
? = nongreedy



Spoiler:

= (1 char)
== (2 char)
=== (3 char)
====
=====
====== (6 char)
Reply With Quote
  #2  
Old 23.05.2019, 11:49
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,544
Default

why the ?
so more than = are not allowed?

^={1,3}(?![=]+)
__________________
JD-Dev & Server-Admin
Reply With Quote
  #3  
Old 23.05.2019, 14:19
djmakinera djmakinera is offline
Banned
 
Join Date: May 2010
Location: Poland
Posts: 8,387
Default

Because 3 characters are unified everywhere. But that I could make a mistake anywhere, now I can correct it quickly.

This pattern is also correct:
For example: The minimum / maximum number of characters is 3. In this case.

^(=){3,3}$
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 16:20.
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 - 2024, Jelsoft Enterprises Ltd.