Using Variables in Regular Expressions

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
mbosner Offline
Junior Member
Posts: 38
Joined: Nov 2009
Reputation: 0
Post: #1
I just started writing a scraper and was wondering if i can use the $$ variables in a regular expression. I couldn't find any informations in the forums or wikis.

Martin
find quote
bambi73 Offline
Senior Member
Posts: 165
Joined: Jan 2010
Reputation: 0
Location: Czech Republic
Post: #2
If you mean something like this

Code:
<RegExp input="$$1" output="\1" dest="5">
  <expression clear="yes" noclean="1">(?i)(&lt;episode id=&quot;$$3&quot;.*?&lt;/episode&gt;)</expression>
</RegExp>

then yes
find quote
mbosner Offline
Junior Member
Posts: 38
Joined: Nov 2009
Reputation: 0
Post: #3
Thanks!

I tried that but thought it did not work. Is it possible to output the regex to the xbmc.log file before it gets executed?
find quote