> 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.