"\0" useable?
#1
@ spiff or vdrfan

Is it possible to use \0 for the entire capture while using \1-\9 as the group captures? Say I wanted to create a filenamescrape and the Filename was "Final Contact 3" for instance, and i wanted to set the "set" for sequel movie...

Could i do something like

Code:
<RegExp input="$$1" output="<title>\0</title><set>\1</set>" dest="5">
     <expression>[^0-9]+ ([0-9]+)</expression>
</RegExp>

reason i ask exactley, is because when getting results, from a webpage, one is almost always limited to using 1 RegExp to capture the entirety of the
entities on the page, which limits the number of info you can pull for each item to 9, i have run into an instance where i (and this is mainly for personal use at the moment) am wanting to pull 9 captures and the save the entire capture group itself too. I was just wondering about the possibility of using the \0 rather than nesting more regular expressions.

or do you use \0 for something in your regular expression engine?
ScraperXML Open Source Web Scraper Library compatible with XBMC XML Scrapers


I Suck, and if you act now by sending only $19.95 and a self addressed stamped envelop, so can you!

Image
Reply
#2
uhm, it's defined in regexps as \& no? why introduce a nonstandard beast?
Reply
#3
well i couldn't find the definition used so i supposed it didn't exist, thanks for straightening that out for me
ScraperXML Open Source Web Scraper Library compatible with XBMC XML Scrapers


I Suck, and if you act now by sending only $19.95 and a self addressed stamped envelop, so can you!

Image
Reply
#4
Nicezia Wrote:Is it possible to use \0 for the entire capture while using \1-\9 as the group captures? Say I wanted to create a filenamescrape and the Filename was "Final Contact 3" for instance, and i wanted to set the "set" for sequel movie...
Could i do something like
Code:
<RegExp input="$$1" output="<title>\0</title><set>\1</set>" dest="5">
     <expression>[^0-9]+ ([0-9]+)</expression>
</RegExp>

Try this instead:
Code:
<RegExp input="$$1" output="<title>\1</title><set>\2</set>" dest="5">
     <expression>([^0-9]+ ([0-9]+))</expression>
</RegExp>

Edit:
Oops, I did not read the end of your post...
However, one could nest RegExp tags, so I do not get this one RegExp thing...
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
"\0" useable?00