WebEPG - Patch for the ability to replace

## Summary: ##
This patch adds a regex replace function to the html parser (indirect to webepg). The regex replace functions will be done on the page source.

## Problem: ##
There are situations, where a template don't match to the whole grabbing page because of some inconsistency on this page. The template goes through the page source and does the work till the inconsistency comes. After this template doesn't much anymore and ignores the rest of this page.
Inconsistency example:
### page source: ###
<pre><code>
...
&lt;div&gt;Time&lt;/div&gt;&lt;div&gt;ProgramName&lt;/div&gt;
&lt;div&gt;Time&lt;/div&gt;&lt;div&gt;ProgramName&lt;/div&gt;
&lt;div&gt;Time&lt;/div&gt;&lt;div&gt;ProgramName&lt;/div&gt;&lt;div&gt;Inconsistency&lt;/div&gt;
&lt;div&gt;Time&lt;/div&gt;&lt;div&gt;ProgramName&lt;/div&gt;
…
</code></pre>
### template: ###
<pre><code>
&lt;div&gt;#TIME&lt;/div&gt;&lt;div&gt;#NAME&lt;/div&gt;
</code></pre>

### result: ###
1. #TIME:Time; #NAME:ProgramName
2. #TIME:Time; #NAME:ProgramName
3. #TIME:Time; #NAME:ProgramName
4. #TIME:Inconsistency; #NAME:Time  ⇒ Error

## Solution: ##
A solution for this problem is to replace/remove this inconsistency before parsing the page (send the page to the template parser).
Since there has been no way for it, I have implemented it myself.

## Solution example: ##
### page source: ###
<pre><code>
...
&lt;div&gt;Time&lt;/div&gt;&lt;div&gt;ProgramName&lt;/div&gt;
&lt;div&gt;Time&lt;/div&gt;&lt;div&gt;ProgramName&lt;/div&gt;
&lt;div&gt;Time&lt;/div&gt;&lt;div&gt;ProgramName&lt;/div&gt;&lt;div&gt;Inconsistency&lt;/div&gt;
&lt;div&gt;Time&lt;/div&gt;&lt;div&gt;ProgramName&lt;/div&gt;
…
</code></pre>
### template: ###
<pre><code>
&lt;div&gt;#TIME&lt;/div&gt;&lt;div&gt;#NAME&lt;/div&gt;
</code></pre>

### replace: ###
<pre><code>
&lt;replace match=”&lt;div&gt;Inconsistency&lt;/div&gt;” replace=”” /&gt;
</code></pre>

### page source before parsing: ###
<pre><code>
...
&lt;div&gt;Time&lt;/div&gt;&lt;div&gt;ProgramName&lt;/div&gt;
&lt;div&gt;Time&lt;/div&gt;&lt;div&gt;ProgramName&lt;/div&gt;
&lt;div&gt;Time&lt;/div&gt;&lt;div&gt;ProgramName&lt;/div&gt;
&lt;div&gt;Time&lt;/div&gt;&lt;div&gt;ProgramName&lt;/div&gt;
…
</code></pre>
### result: ###
1. #TIME:Time; #NAME:ProgramName
2. #TIME:Time; #NAME:ProgramName
3. #TIME:Time; #NAME:ProgramName
4. #TIME:Time; #NAME:ProgramName

## How this works: ##
Now you can add the following new tags to your grabber file.
<pre><code>
&lt;replaces&gt;
    &lt;replace match=”” replace=”” /&gt;
    &lt;replace match=”” replace=”” /&gt;
    ...
&lt;/replaces&gt;
</code></pre>
### Legends: ###
match: The part you want to replace. (Uses RegExp)
replace: The text you want to replace with. (no RegExp)

1. The replace function will do all the replace tasks in the order you write them in your file, from up to down.
2. This replacements will be done before the template parsing, but after the page was cut (template-start, template-end). So the replacement affects only the important part of the page.
3. Because of point 2 and because of the actual structure of “htmlparser” and “webepg” code, the replaces-tags must be placed inside the template-tag.
<pre><code>&lt;template&gt;
   &lt;replaces&gt;
       …
   &lt;/replaces&gt;
&lt;/template&gt;
</code></pre>

I hope you would add this code to git, and we can see that in the next MediaPortal release 1.2.3