The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
PCRE... and i thought i understood it
Ok so here are a few examples of what i am trying to allow
2E2X1 3C051 5B174 First spot needs to be a number, second a letter, third a number again, forth any of the following: X,1,3,5,7,9 and then fifth a number again. I am also trying to allow it to have "DEP" and "Civ" as an option to type as well but would like the capitalization to hold. So here is my expression but i don't fully understand it as much as i thought i did ^[0-9][A-Z][0-9][X13579][0-9]|[DEP]|[Civ]$ Any help would be much appreciated. |
#2
|
|||
|
|||
Something like:
Code:
^([0-9][A-Z][0-9][X13579][0-9])|DEP|Civ$ |
#3
|
|||
|
|||
ok so with that it allows me to put depP and civV... the extra characters and wrong capitals (although i guess nit picky of me) are not what i am trying to do. With [A-Z] it doesn't allow lower case... how can i do that for DEP and Civ?
|
#4
|
||||
|
||||
As long as you aren't using the "i" modifier, it should be case sensitive.
|
#5
|
|||
|
|||
I am using that identical PCRE expression above and i can put more characters then just DEP and casing isn't being followed
|
#6
|
||||
|
||||
Code:
/^([0-9][A-Z][0-9][X13579][0-9])(DEP|Civ)$/ |
#7
|
|||
|
|||
I wish I understood this better... that doesn't work either. Doesn't allow for any combo of lower/upper letters with dep or civ... it also doesn't allow for any combo of the first sequence either. no 2E251 or anything.
|
#8
|
|||
|
|||
Try
Code:
^([0-9][A-Z][0-9][X13579][0-9])|(DEP|Civ)$ |
#9
|
|||
|
|||
Quote:
|
#10
|
||||
|
||||
Code:
/^([0-9][A-Z][0-9][X13579][0-9])(DEP|Civ){0,1}$/ |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|