Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java Regular Expression help

 
Ajith Kallambella
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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='rdoAddAn']/Value='O'
/RenderData/RequestData/Row[Name='sClientType']/Value = 'O'
/RenderData/ErrorData/Error
/RenderData/ProcessData/cadfr/invalidCityStateZipCombination


Much appreciated!
[ February 06, 2006: Message edited by: Ajith Kallambella ]
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This should get you started:

[ February 06, 2006: Message edited by: Lasse Koskela ]
 
Ajith Kallambella
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Lasse. You're da man!!
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd probably make that more generic:

"\\s+(((or)|(and)|(not))\\s+)*";

I think it also reads better...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic