regex - Need fresh eyes on Python assertRegexpMatches -
my regex using :
ur"^[\s\s]*ticket price (including £0.50 booking fees)[\s\s]£5.50[\s\s]*$"
and string comparing :
"ticket price (including £0.50 booking fees) £5.50"
i have been messing around on regex101.com no avail. logic seems right me, not matching (i trying use assertregexpmatches() test code). or tips appreciated.
you need escape paranthesis , dots (decimal). in regex (..)
called capturing group used capture chars. match literal (
, )
brackets, must escape them in regex.
ur"^[\s\s]*ticket price \(including £0\.50 booking fees\)[\s\s]£5\.50[\s\s]*$"
Comments
Post a Comment