Python Forum
Need help with my code (regular expression)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help with my code (regular expression)
#3
Thanks for help/suggestions.

On little further search, I figured following expression does the trick perfectly.
result = re.findall(r"[-+]?[0-9]*.?[0-9]+", txt)
Reply


Messages In This Thread
RE: Need help with my code (regular expression) - by shailc - Apr-03-2022, 10:54 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Regular expression help anilrajr 4 2,009 May-08-2024, 06:18 PM
Last Post: deanhystad
  data validation with specific regular expression shaheen07 0 967 Jan-12-2024, 07:56 AM
Last Post: shaheen07
  Is the following code returning a generator expression? quazirfan 8 3,483 Apr-11-2023, 11:44 PM
Last Post: quazirfan
  Regular Expression search to comment lines of code Gman2233 5 3,074 Sep-08-2022, 06:57 AM
Last Post: ndc85430
  List Creation and Position of Continue Statement In Regular Expression Code new_coder_231013 3 2,838 Jun-15-2022, 12:00 PM
Last Post: new_coder_231013
  Regex Expression With Code Query In Pandas eddywinch82 8 4,250 Apr-13-2022, 09:12 AM
Last Post: snippsat
  Regular Expression for matching words xinyulon 1 2,871 Mar-09-2022, 10:34 PM
Last Post: snippsat
  regular expression question Skaperen 4 3,584 Aug-23-2021, 06:01 PM
Last Post: Skaperen
  How can I find all combinations with a regular expression? AlekseyPython 0 2,251 Jun-23-2021, 04:48 PM
Last Post: AlekseyPython
  Python Regular expression, small sample works but not on file Acernz 5 4,566 Jun-09-2021, 08:27 PM
Last Post: bowlofred

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020