Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
Can someone tell me how to allow in Regex all a-zA-Z0-9 except 6 digits long number?
So true for:
1234567
a123456
123456P
3A237bdb8
but false for
123456
I want to
allow only letters and digits
deny 6 digit long number (like 123456) and other not letter characters like -_+,.!##$ etc.
If your regex engine supports lookahead, you can use:
^(?!\d{6}$)[a-zA-Z0-9]+$
Demo
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
Looking for a regular expression in Notepad++ to find any years outside of the year range: 1980-2019
This will find WITHIN the year range I'm looking for, but I can't find outside of the range.
[1-9]\d{4,}|19[8,9][0-9]|[1-9]\d{4,}|20[0,1][0-9]
Any help is greatly appreciated!
I don't particularly think regex is suitable for this, but this might work:
(?![1-9]\d{4,}|19[8,9][0-9]|[1-9]\d{4,}|20[0,1][0-9])\b\d+
I simply negated your regex with a negative lookahead, and matched the digits with \d+. This will match any number of digits, because technically the year 1 is also outside of the range 1980-2019. If you only want 4 digit years, simply change + to {4}.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
Would some one please tell me the following Regex?
At least eight or more characters.
At least one lower-case letter.
At least one upper-case letter.
At least one number.
Thanks in advance.
Variation on Complex Password Regular Expression
You can use this lookahead based regex:
^(?=.*?[a-z])(?=.*?[A-Z])(?=.*?[0-9]).{8,}$
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I want a regex to match cost.
Valid cost-
1.1234455
12.434343
123.3333
..
upto 10 digits maximum..
and invalid is
0.545454
000.5435435
Here is a regex that will match any cost except those that have all zeros before the floating point
(?!0+\.)\d+\.\d+
http://regex101.com/r/pQ4kB3
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I want to set up a rule for a string:
8 chars
first 4 is alphabet, case insensitive.
last 4 is number
how to write a regular expression for this case?
^[a-zA-Z]{4}\d{4}$
Explanation:
^ start of string
[a-zA-Z] the characters a to z and A to Z
{4} repeat the list item 4 times
\d a digit character
{4} repeat the list item 4 times
$ end of string
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
What would be the correct way of writing a regex that states:
/ followed by any number
For example, gets fired with "/1", "/2", but not "/a" etc.
PCRE
/\/\d/
this will match any '/' followed by any single character number number.
/\/\d+/
this will match '/' followed by any set of consecutive numbers.
/^\/d+$/
this will match '/' followed by any set of consecutive numbers that are the only thing on that line.