Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
extract version in a string
#1
Hi,

I need help to extract only version in the following string.

str="psutil-5.4.5-cp27-none-win32.whl"

output should be : 5.4.5

Appreciate help on this.

Thx,
Lokesh
Reply


Messages In This Thread
extract version in a string - by lokesh - Oct-09-2019, 05:21 AM
RE: extract version in a string - by perfringo - Oct-09-2019, 05:25 AM
RE: extract version in a string - by buran - Oct-09-2019, 05:49 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  extract substring from a string before a word !! evilcode1 3 544 Nov-08-2023, 12:18 AM
Last Post: evilcode1
Question Extracting Version Number from a String britesc 2 1,095 May-31-2023, 10:20 AM
Last Post: britesc
  Extract a string between 2 words from a text file OscarBoots 2 1,881 Nov-02-2021, 08:50 AM
Last Post: ibreeden
  How to extract specific key value pair from string? aditi06 0 2,537 Apr-15-2021, 06:26 PM
Last Post: aditi06
Question How to extract multiple text from a string? chatguy 2 2,375 Feb-28-2021, 07:39 AM
Last Post: bowlofred
  Extract continuous numeric characters from a string in Python Robotguy 2 2,644 Jan-16-2021, 12:44 AM
Last Post: snippsat
  Please support regex for version number (digits and dots) from a string Tecuma 4 3,193 Aug-17-2020, 09:59 AM
Last Post: Tecuma
  extract a dictionary from a string berc 4 2,867 Jul-30-2020, 06:58 AM
Last Post: berc
  Extract data from large string pzig98 1 2,133 Jul-20-2020, 12:39 AM
Last Post: Larz60+
  xml.etree.ElementTree extract string values matthias100 2 4,987 Jul-12-2020, 06:02 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

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