0
What '?' Does in regex?
I have a regular expression : re.search(r"^[+-]?[0-9]*\.[0-9]*
quot;,txt). I don't understand the use of '?'.4 Respuestas
+ 4
rodwynnejones is right, I corrected my answer.
+ 3
I'm sure the "?" means zero or one occurrence.
+ 2
edited
? zero or one occurance only of preceding letter
[+-]? matches + or - or ''