Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / February 2007

Tip: Looking for answers? Try searching our database.

Pls Help!!!

Thread view: 
vanita_tadake@yahoo.co.in - 08 Feb 2007 11:44 GMT
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.
Andreas Leitgeb - 08 Feb 2007 12:17 GMT
> 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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.