You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It may be worth allowing commas as well, both because they are decimal separators in some languages and because they are thousand separators in other languages, including English.
It's a very common use case that extracts the number from a string, like
4.3
from4.3 out of 5 stars
.For example, for this input
["4.3 aa", "2.6 bb"]
, we want to extract a result as["4.3", "2.6"]
but we don't have a quick way to do it.re_search("([0-9.]+)")|first
does not work, asfirst
takes the first row of the output, not a list of the first group, so we will get('4.3',)
My proposal is to return a string instead of the groups, if no any group specified, then we will get the expected result by
re_search("[0-9.]+")
The text was updated successfully, but these errors were encountered: