Adding an answer to @Zenoo if you want to take %20 into account as a single occurrence, you can use the following expression:
[pP]([a-zA-Z0-9 +-]|(%20)){14,}0000
where you basically add %20 to the list of possible characters as one occurrence.
Here is a live demo that you can use to test all the desired examples (I already including the ones you provided), with all the necessary technical explanations that I copy below:
- pP matches one character in the pP list (case sensitive)
- 1st capture group ([a-zA-Z0-9 + -] | (% 20)) {14,} {14,} Quantifier - Matches between 13 and unlimited time, as many times as possible, returning as necessary ( greedy)
- 1st alternative [a-zA-Z0-9 + -] Matches one character in the list below [a-zA-Z0-9 + -] az one character in the range between index 97 and z (index 122) (with case sensitive)
- AZ - one character in the range between A (index 65) and Z (index 90) (case sensitive) 0-9 one character in the range from 0 (index 48) and 9 (index 57) (case sensitive)
- + - matches one character in the + - list (case sensitive)
- Second alternative (% 20) Second capture group (% 20)% 20 matches% 20 characters literally (case sensitive)
- 0000 matches the letters 0000 literally (case sensitive)
source share