Can anyone help to write a regular expression to fetch TEST 31275 from the below text

0 votes
Hi, team can anyone help to write a regular expression to fetch TEST:31275 from the below text.

TEST is static text and numbers are dynamic values.

Sample data:

description= olfactory receptor family 4 subfamily F member 29 [Source:TEST Symbol%3BAcc:TEST:31275]
Jun 25, 2020 in Python by anonymous
• 6,260 points
519 views

1 answer to this question.

0 votes

Try using the following expression:

Grep -o "TEST:d+" <filename>

Hope this helps!

answered Jun 25, 2020 by Nipul Aglawe

Related Questions In Python

0 votes
1 answer
0 votes
1 answer

I want to download a file from the website by web scraping. Can anyone explain how to do this in jupyter lab (python) with an example?

Hey, Web scraping is a technique to automatically ...READ MORE

answered Apr 7, 2020 in Python by Gitika
• 65,770 points
2,378 views
–1 vote
2 answers
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,422 views
0 votes
1 answer
+5 votes
6 answers

Lowercase in Python

You can simply the built-in function in ...READ MORE

answered Apr 11, 2018 in Python by hemant
• 5,790 points
4,042 views
0 votes
2 answers

Is it possible to launch python idle from a virtual environment?

Try running the following code. #!/usr/bin/env python """Simple script ...READ MORE

answered Jun 25, 2020 in Python by Sirajul
• 59,230 points
5,948 views
0 votes
1 answer

How to import an image into a csv file using python?

I am sure you are aware CSV ...READ MORE

answered Jun 25, 2020 in Python by Bhanu Kumar
7,919 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP