Menu

Tag attribute name and value as Regex

Help
2005-10-26
2013-04-27
  • Shuvadeep Lahiri

    Hi,
         It is quite easy to extract a particular tag from the parser given any of it's attribute name or value (or both), like the following :

    NodeList list = newparse.extractAllNodesThatMatch(new AndFilter(new TagNameFilter("TR"),new HasAttributeFilter("Color","Green")));

    Now suppose I want to execute the similar operation but with giving the attribute name and/or attribute value as a regular expression. When I tried (passing it as new RegexFilter) it throws an exception; hence I could not do this.
          Is there a way out?
    Best Wishes,
                                              Shuvadeep

     

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.