File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Java Regular Expression help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Java Regular Expression help" Watch "Java Regular Expression help" New topic

Java Regular Expression help

Ajith Kallambella

Joined: Mar 17, 2000
Posts: 5782
Calling all regEx gurus.

Here is a string -

I'd like to use Java Regex classes to extract the followign strings

/RenderData/RequestData/Row[Name='sClientType']/Value = 'O'

Much appreciated!
[ February 06, 2006: Message edited by: Ajith Kallambella ]

Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
Lasse Koskela

Joined: Jan 23, 2002
Posts: 11962
This should get you started:

[ February 06, 2006: Message edited by: Lasse Koskela ]

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Ajith Kallambella

Joined: Mar 17, 2000
Posts: 5782
Thank you Lasse. You're da man!!
Ilja Preuss

Joined: Jul 11, 2001
Posts: 14112
I'd probably make that more generic:


I think it also reads better...

The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
I agree. Here's the link:
subject: Java Regular Expression help
jQuery in Action, 3rd edition