Newbie Need Help On Regex!

infosecflag at gmail.com infosecflag at gmail.com
Mon Oct 10 10:59:59 EDT 2016


Hey guys!
 
I am new to learning regex in python and I'm wondering how do I use regex in python to store the integers(positive and negative) i want into a list!
 
For e.g.
 
This is the data in a list.
 
[u'\x1b[0m[\x1b[1m\x1b[0m\xbb\x1b[0m\x1b[36m]\x1b[0m (A=-5,B=5)', u'\x1b[0m[\x1b[1m\x1b[0m\xbb\x1b[0m\x1b[36m]\x1b[0m (A=5,Y=5)', u'\x1b[0m[\x1b[1m\x1b[10m\xbb\x1b[0m\x1b[36m]\x1b[0m : ']
 
How do I extract the values of A and B and store them in a variable I want using regex?
 
Thank you and appreciate it :)



More information about the Python-list mailing list