Python regex and spaces? -


if have piece of text, i.e.

title="gun control" href="/ebchecked/topic/683775/gun-control"

and want create regular expression matches (see inside <> below)

title="<1 word or many words separated space>" href="/ebchecked/topic/\w*/\s*"

how solve part in <>?

the following regex match 1 word or many words separated space:

\w+( \w+)* 

here "word" considered consist of letters, digits, , underscores. if want allow letters use [a-za-z]+( [a-za-z]+)*.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -