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

matlab - How to equate a structure array to structure array -

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -