Date Range Regex in Notepad++ [closed] - regex

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}.

Related

How do I write a Regex pattern to match the following strings? [closed]

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 2 years ago.
Improve this question
I have string that could come in several forms
“PSM000216556880035450088|TRF”
“VNM000216556880035450088|TRF FROM MACK”
“NXG000216556880035450088”
“Transfer from josh SL000216556880035450088 to jack”
“X00000216556880035450088 0098123 TRANSFER 789121”
I need a Regex pattern that could get the string that starts with PSM, VNM, NXG, SL00 or X00.
i.e. in 1, I need “PSM000216556880035450088”. This string is the reference and it is what I need. It can be found in any position in a sentence and sometimes the reference might not be separated from the other words by a space. Sometimes a special character can be used as a separator. i…e. in 2 “VNM000216556880035450088|TRF FROM MACK”.
I will be using the Regex in my VB.NET code.
What about this with multiline flag?
((?:PSM|VNM|NXG|(SL|X)00)\d+)

Regex: check if string corresponding Word numbering list style [closed]

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 2 years ago.
Improve this question
I'm looking for regex-way to find if a string matches any of this pattern:
2.
1.2
3.4.5
These numbers are taken from the numbering list of Word.
If you only want to match what is above, use ^((\d\.)+\d|(\d\.))$. (Link to regex tester).
This will either match that first kind of pattern (with a digit and then a period) or the other two, which have a digit followed by a period more than 1 time, and another digit at the end.
If you also want to match patterns like 3.4., i.e., strings that may or may not end in a period, you can use ^(\d\.)+\d?$ (Link)
This matches patterns that have a digit followed by a period one or more times, and then maybe a digit after that.

Regex: extract value from double quotes [closed]

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
having a hard time to find regex solution.
The value in database's field "product_id" can be in either format:
{"value":"e19f2b3e-9919-421e-a125-95fdd989459d"}
{"itemUuid":"8fe2a09e-aade-485c-b847-e83a780f1b8e"}
Need to write a regex capturing BOTH cases, so the result will be:
e19f2b3e-9919-421e-a125-95fdd989459d
8fe2a09e-aade-485c-b847-e83a780f1b8e
What I already did (in Vertica syntax) is
trim(TRAILING '"}' from regexp_substr(me.value, '[0-9].*'))
which doesn't capture the id if it starts with alphabetic character.
You can use the RegEx (?<=:").+(?="})
(?<=:") makes sure there is :" before your match
.+ matches any char at least once
(?="}) makes sure there is"} after your match
Demo.

What is the regular expression to find a string in log files with the following format: "Failures: [!0]"? [closed]

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'm looking for the regular expression to find failures in a log file.
The format is "Failures: " following the number of error, a digit not zero
Thanks!
You can use this:
"Failures:\s+[1-9]\d*"
this would be what you are looking for:
Failures:\s*[1-9]\d*
btw, you may want to know that in character class, the not notation is ^, not !.
E.g. [^a-zA-Z] means not letters.

Regex Specific Match String [closed]

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,}$