Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

rexml and regex

 
Chris Dancy
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Chris Dancy
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic