#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2012
    Posts
    3
    Rep Power
    0

    Regular Expression opposite


    Hi All,

    i had a regular expression which filters the date field MM/dd/yyyy i.e., ^(0[1-9]|1[012])[- //.](0[1-9]|[12][0-9]|3[01])[- //.](19|20)\d\d$. My question is i can filter matching records but i need which are not in this format (i need to fetch the records other than this format). for that i found (^((?!((0[1-9]|1[012])[- //.](0[1-9]|[12][0-9]|3[01])[- //.](19|20)\d\d)).)*$) in searching but it is not working in java scriptella.

    please help me on this.

    thanks in advance.
    Anil Kumar M
  2. #2
  3. /*
    Devshed Novice (500 - 999 posts)

    Join Date
    Mar 2007
    Location
    Sydney, Australia
    Posts
    729
    Rep Power
    620
    Just putting it out there but might it not be easier to use a DateFormatter if you are using java?
    */
  4. #3
  5. Did you steal it?
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,053
    Rep Power
    9398
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2012
    Posts
    3
    Rep Power
    0
    Originally Posted by requinix
    In general the negation of ^X$ is ^(?!X$).
    Hi requinix,

    thanks this is working for me.
    Thanks a lot.

IMN logo majestic logo threadwatch logo seochat tools logo