This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Ruby and the fly likes rexml and regex Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Languages » Ruby
Reply Bookmark "rexml and regex" Watch "rexml and regex" New topic
Author

rexml and regex

Chris Dancy
Ranch Hand

Joined: Feb 14, 2006
Posts: 136
I want to get the text of an attribute and perform a regex on it ... something like the following



And I want to use ruby's wonderful regex to remove the capitalized "AND" ... something like...



any ideas?


("Anger is not an emotion, its a symptom of fear.")
Chris Dancy
Ranch Hand

Joined: Feb 14, 2006
Posts: 136
I actually solved this problem trying to debug it ... here is how you do it .


I assumed ".value" just returned the string but it in fact actually returns the pointer(for lack of a better term) to the string. It returns the node itself to work on. Sweet deal.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: rexml and regex
 
Similar Threads
Regular Expression Question
regex for month's name
jdk1.4 regex help
check employeeId field is of 8 characters only?
regex to find url