1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

random string not matching reg ex

Discussion in 'Java' started by max12345, Dec 17, 2011.

  1. max12345

    max12345 New Member

    Joined:
    Nov 3, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Hello there,

    i am trying to write an algorithm that generates a random string NOT matching a given regular expression, does anyone have an idea on the correct ways of going about this?
     
  2. ManzZup

    ManzZup New Member

    Joined:
    May 9, 2009
    Messages:
    278
    Likes Received:
    43
    Trophy Points:
    0
    Occupation:
    Production Manager:Software @ ZONTEK
    Location:
    Sri Lanka
    Home Page:
    you can put the compliment [or the not] for the whole expression and then generate a str with that
    so that regex would be searching for the quite opposite of it :)
     

Share This Page