View Single Post
Old 11-30-2011, 07:50 PM   #5
sellew
Enthusiast
sellew has a complete set of Star Wars action figures.sellew has a complete set of Star Wars action figures.sellew has a complete set of Star Wars action figures.sellew has a complete set of Star Wars action figures.
 
Posts: 30
Karma: 300
Join Date: Oct 2011
Location: Barcelona
Device: Sony PRS-650, PRS-T2
I'm not very much experienced in regex but maybe I can throw some light. The parentheses are used to create a group, so that when replacing you can refer to it. That's the meaning of '\1': keep the original set of characters (the group) as it is.
You can use more than one group in the expression you want to match, for instance:
<p class="calibre2"><span class="none">([0-9]+\.)</span>blablabla([0-9])</p>
Then, when replacing, you can refer to each group using \1 and \2.
Of course you can use as many groups as required depending on the complexity of the search.
sellew is offline   Reply With Quote