I'm pulling different sections out of a string for a webscrapping project. my string im using regex on looks like this its currently the variable insidetext:
ABC Company (ABC) upgraded to neutral at BESTBANK; PT $18
I'm trying to get the first part of the before (ABC) so im using regex in Python.
companyname = re.match('.+?(?=[ ][(])',insidetext) print(companyname)
this is the output it gives me
<re.Match object; span=(0, 20), match=' ABC Company'>
I just want the matched portion. Example I just want it to print ABC Company
What can I do to remove the re.Match object; span=(0, 20), match= section?