Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

extract data between single quotes

trying to extract the data between single quotes

import re 

a = 'USA-APA HA-WBS-10.152.08.0/24'

print(re.findall(r'()', a))

expecting the oputput : USA-APA HA-WBS-10.152.08.0/24

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

I am not very familiar with python but with some quick searching around
I’ve found that this work

import re

a = 'USA-APA HA-WBS-10.152.08.0/24'
result = re.findall(r'(.*?)', a)
print("".join(result))

I’m pretty sure there are better ways of solving this but I’m not familiar with the language

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading