Python Forum
Python regex to get only numbers
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python regex to get only numbers
#6
The "?:" in the capture group changes it to a non-capturing group. So "(?:FEW|SCT|BKN|OVC)(\d{3})" would result in only the numbers. From what you posted, it looks like you compiled the regex using my code but didn't use it to match anything.
Reply


Messages In This Thread
Python regex to get only numbers - by tantony - Oct-09-2019, 04:39 PM
RE: Python regex to get only numbers - by stullis - Oct-09-2019, 05:12 PM
RE: Python regex to get only numbers - by tantony - Oct-09-2019, 06:57 PM
RE: Python regex to get only numbers - by snippsat - Oct-09-2019, 07:21 PM
RE: Python regex to get only numbers - by tantony - Oct-09-2019, 07:45 PM
RE: Python regex to get only numbers - by stullis - Oct-09-2019, 10:27 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Python Regex quest 2 2,424 Sep-22-2022, 03:15 AM
Last Post: quest
  Find numbers using Regex giddyhead 18 3,280 Jul-28-2022, 12:29 AM
Last Post: giddyhead
  python regex: get rid of double dot wardancer84 4 2,428 Sep-09-2021, 03:03 PM
Last Post: wardancer84
  Using Regex Expression With Isin in Python eddywinch82 0 2,323 Apr-04-2021, 06:25 PM
Last Post: eddywinch82
  Exception handling in regex using python ShruthiLS 1 2,389 May-04-2020, 08:12 AM
Last Post: anbu23
  Python the regex not getting any attributes sarath_unrelax 1 1,881 Dec-19-2019, 11:06 AM
Last Post: Larz60+
  Print Numbers starting at 1 vertically with separator for output numbers Pleiades 3 3,786 May-09-2019, 12:19 PM
Last Post: Pleiades

Forum Jump:

User Panel Messages

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