regex - Performing validation with Regular expressions in vbscript -


i have validate string correct syntax is:

['#dog.attribute#'='1' , ['#cat.anotherattribute#' in ('1','2')] 

'dog' , 'cat' stands special words in business rules...

i'm doing validations , want find in string, using vbscript regular expressions, following errors (going left right):

  • substrings can exist anywhere, starting '#

  • between ' , # can't exist anything

  • there exist 1 cardinal #

  • after cardinal # must exist dog or cat (it case sensitive)

  • after dog or cat there must dot . (without spaces on left , on right)

  • after dot exist regex [a-za-z\.\\]* (at least 1 character)

  • and after [a-za-z\.\\]* , string ends #', without else, 1 # , 1 '

this seems easy, i'm having problems developing it. can me out?


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -