Python Forum
How to get values from part of a string?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to get values from part of a string?
#1
this is the my log


2019-05-15 23:54:00,001 INFO [com.xxxxx.xxxx.xxxx] [xxxxxxxxx] xxxxx xxxxx: 13840.13500213623/16384.0/13840.13500213623

i have to get values 13840 and 16384 and stored in diff variable any one please help.
Reply
#2
split at space. then split the last element in the result at '/'.
Here it's not clear what you need so process the result accordingly

another option is to use RegEx
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Trying to compare string values in an if statement israelsattleen 1 519 Jul-08-2023, 03:49 PM
Last Post: deanhystad
  Getting rid of old string values Pedroski55 3 970 Oct-11-2022, 10:56 PM
Last Post: Pedroski55
  mutable values to string items? fozz 15 2,697 Aug-30-2022, 07:20 PM
Last Post: deanhystad
  ElementTree get attribute value part of string paulo79 1 2,044 Apr-05-2022, 09:13 PM
Last Post: deanhystad
  Function parameters and values as string infobound 1 1,728 Jul-24-2020, 04:28 AM
Last Post: scidam
  xml.etree.ElementTree extract string values matthias100 2 4,857 Jul-12-2020, 06:02 PM
Last Post: snippsat
  rjust part of a string pythonprogrammer 2 2,010 Sep-17-2019, 12:44 AM
Last Post: snippsat
  Change values in string multiline DavidFernandez 4 3,026 Aug-26-2018, 08:09 PM
Last Post: buran
  How to call the values at the end of a text string? Dieselkaine 2 2,931 Jul-02-2018, 08:47 PM
Last Post: Dieselkaine
  Search for string values in begood321 7 4,195 Mar-21-2018, 02:36 AM
Last Post: tannishpage

Forum Jump:

User Panel Messages

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