Pls Help!!!

Discussion in 'Java' started by vanita_tadake@yahoo.co.in, Feb 8, 2007.

  1. Guest

    Hi All,

    I want to write conditional regular expression in Java/J2EE.

    Any sample example will be preferrable. In Dot Net , conditional regex
    are working properly but i want to do it in java/J2EE.

    Like i have following regex in dot net which i want to write in java/
    J2EE. :-

    (([<]title).*(\bcontract(s)?\b|\border(s)?\b|\bsign(s|ed)?\b|
    \bw[io]n(s)?\b).*(title[>]))(?=(?>(.|\n)*?([<]body).{1,1000}?(\b(re)?
    new\b|\bpen(s)?\b).{1,100}?(\bdeal(s)?\b)))

    Any help will be truely appriciated.

    Thanks in advance.
    , Feb 8, 2007
    #1
    1. Advertising

  2. <> wrote:
    > Hi All,
    > I want to write conditional regular expression in Java/J2EE.
    > Any sample example will be preferrable. In Dot Net , conditional regex
    > are working properly but i want to do it in java/J2EE.
    > Like i have following regex in dot net which i want to write in java/
    > J2EE. :-


    > (([<]title).*(\bcontract(s)?\b|\border(s)?\b|\bsign(s|ed)?\b|
    > \bw[io]n(s)?\b).*(title[>]))(?=(?>(.|\n)*?([<]body).{1,1000}?(\b(re)?
    > new\b|\bpen(s)?\b).{1,100}?(\bdeal(s)?\b)))


    At first glance, I can't see anything that wouldn't also
    work as a "Pattern" in java.

    What's this "conditional" about?
    See docu for java.util.regex.Pattern, on how to
    get a boolean result (matches()? yes/no) from a
    pattern and a string.
    Andreas Leitgeb, Feb 8, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alistair Lamb

    CLOCK__SIGNAL constraint! pls help

    Alistair Lamb, Mar 24, 2005, in forum: VHDL
    Replies:
    1
    Views:
    1,536
    Tim Good
    Mar 24, 2005
  2. James Bond
    Replies:
    0
    Views:
    513
    James Bond
    Aug 3, 2004
  3. Rahul S.
    Replies:
    3
    Views:
    594
    Flash Gordon
    Nov 1, 2004
  4. Replies:
    1
    Views:
    272
    RedGrittyBrick
    Jan 2, 2008
  5. Emiliano
    Replies:
    2
    Views:
    314
    Rajesh.V
    Oct 16, 2003
Loading...

Share This Page