regexp like this:
/<span[^>]*class=\"link[^>]*params=\"(\d+),(\d+),[^>]*>[^<]*from.*?(\d{1,2})(.*?)(\d{4}).*?(year|Year)[^<]*<\/span>/
string like that:
<p id="p_195" class="s_16" style="text-indent:6pt;"><span class="link s_8" params="65537,21403229,0,195,0,0" onmouseover="this.style.textDecoration='underline';" onmouseout="this.style.textDecoration='none';" onclick="return onClickLink(event, this);">Sometext from 28 september 2013& nbsp;year</span></p>
The trouble is that september
with
. There can be a space or
. I change regexp to: bla-bla-blah... from.*?(\d{1,2})**(& nbsp;|\s)**(.*?)(\d{4}).*?(year|Year) ...bla-bla-blah
(& nbsp; without a space)
So, in matches I've got a ( |\s)
. But I do not need em there! How to group ( |\s)
without getting em to matches?