Page 1 of 1

Expression with a minium length must contan numbers

PostPosted: Sun Apr 10, 2016 5:06 pm
by Valmont
Slowly learning regex by simply doing it.
Code: Select all
[a-zA-Z0-9]{10,}

The code above will search any pattern containing characters or numbers where the combination of therefore, or either numbers or characters have 10 or more literals. That's close to what I want. I need a similar formula but this time
(1) at least one number MUST be contained within the expression to be searched for. Example: 288TVeTU4uQzGBbN_SR1oWPRhQ_7v
Wrong though: qZporGeklnEfoieimnaLhHJtl <-- contains no number(s)
(2) The total amount characters in the entire expression where the range is [a-zA-Z0-9] must have a minimum amount (say 10).
So [COOLCAT].<readtxt>.288TVeTU4uQzGBbN_SR1oWPRhQ_7v.HOMEY.720p.rar qualifies as it has a substring meeting this requirement.

Cheers.

Re: Expression with a minium length must contan numbers

PostPosted: Mon Apr 11, 2016 9:47 am
by Quade
I'm unclear if you're asking a question or if this is more tutorial in nature.

I tend to use ranges {X,Y} for many of my RE's.

Re: Expression with a minium length must contan numbers

PostPosted: Mon Apr 11, 2016 9:55 am
by Valmont
Quade wrote:I'm unclear if you're asking a question or if this is more tutorial in nature.

I tend to use ranges {X,Y} for many of my RE's.

LOL it was a question. But I was illogical so never mind. I got really far myself though I still don't know how to test for a string length!
So let's change my requirements: (1) how to test a string for it's length? How to test the returned substring (which matches the RE) for it's length?