I am trying to extract values from a string, I was trying to get re.match , but had no luck. Line:
'/opt/ad/bin$ ./ptzflip\r\nValue = 1800\r\nMin = 0\r\nMax = 3600\r\nStep = 1\r\n'
I tried:
map(int,re.search("Value\s*=\s*").group(1))
as well as:
'/opt/ad/bin$ ./ptzflip\r\nValue = 1800\r\nMin = 0\r\nMax = 3600\r\nStep = 1\r\n'.split(' = ')
I'm not sure what else to add or do. I want to get the attributes 'Value, Max, Step' and their values. Is there any way to do this?
Thanks for any help
source share