python - Regex for X or not Y -


i have long string of text that's broken semi-colons, have regex captures [^\;]+. however, it's bugging because content contains html apostrophes ( ' ).

how can write regex capture semi-colons unless semi-colon part of html apostrophe?

(&\s+?;|[^;])+ 

match html entities if single characters.


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -