As you can see on Rubular the regexp <p( style=".+"){0,1}>.+<\/p>
matches the string <p>aasdad</p>
.
But, when I do "<p>sdasdasd</p>".scan(/<p( style=".+"){0,1}>.+<\/p>/)
I get [[nil]]
. Why the matched string is not included in the return value?