Skip to content

Commit

Permalink
fix float regex
Browse files Browse the repository at this point in the history
  • Loading branch information
parkervg committed Jul 30, 2024
1 parent c79811c commit 381d743
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion blendsql/parse/_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ def create_regex(
# This is 20 digits long, so to be safe, cap the generation at 19
base_regex = r"((\d{1,18}" + f"|{DEFAULT_NAN_ANS}){DEFAULT_ANS_SEP})"
elif output_type == "float":
base_regex = r"(((\d|\.)+" + f"|{DEFAULT_NAN_ANS}){DEFAULT_ANS_SEP})"
base_regex = r"((\d(\d|\.)*" + f"|{DEFAULT_NAN_ANS}){DEFAULT_ANS_SEP})"
else:
raise ValueError(f"Unknown output_type {output_type}")
return lambda num_repeats: base_regex + "{" + str(num_repeats) + "}"
Expand Down

0 comments on commit 381d743

Please sign in to comment.