View Single Post
Old 09-14-2012, 04:31 PM   #20
cirocco
Member
cirocco began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Aug 2007
Device: Kindle 4
regexp problem

Choosing columns to update is better solution than only few buttons, just too hard for me , default to update nothing is good too. But I think "all or nothing overwrite" is not good, my buttons work for selected books (with single or multiple matches) which is is more flexible.

I have had a lot of troubles with XPath for series idx. Here is the sample html:

Spoiler:
Code:
<li>
   <a href="book.aspx?id=106">Johnny i zmarli</a>
   <a class="icon" href="/book.aspx?id=106#reviews">
      <img src="images/report.png" style="display:inline; vertical-align:-4px; margin-left:5px;" title="do książki dodano opisy lub recenzje" /></a><a class="icon" href="/book.aspx?id=106&mode=bookshare#bookshare"><img class="bookExchangeIconAjax" id="106" src="images/group_go.png" style="display:inline; vertical-align:-4px; margin-left:5px;" />
   </a> 
   (tom: 2) 
</li>


with
Code:
../text()
I got (with newlines)
Code:
     (tom: 2)
but could not get the number out of it. I eventually gave up and used python to get it.
Is it possible to do it with XPath only? If not maybe some support in python? seeking number anywhere in given string?
cirocco is offline   Reply With Quote