base_filter.rb determine_example_type regex too narrow
Reported by Chris Maynard | October 22nd, 2009 @ 07:15 AM
This valid XPATH is getting misidentified as a string:
'//div[@class="myclass"]/a/@href' while these work:
'//div[@class="myclass"]/@href' '//div/a/@href' etc.
base_filter.rb line 104 column 102:
when /^\/{1,2}[a-z]+[0-9]?(\[[0-9]+\])?(\/{1,2}[a-z()]+[0-9]?(\[[0-9]+\])?)*(\[@.+=.+\])?(\/@.+)?$/
needs another ? added:
when /^\/{1,2}[a-z]+[0-9]?(\[[0-9]+\])?(\/{1,2}[a-z()]+[0-9]?(\[[0-9]+\])?)*(\[@.+=.+\])?(\/@?.+)?$/
Then the XPATH works fine.
No comments found
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
A simple to learn and use, yet powerful web scraping toolkit written in Ruby.