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
106 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,950 points
881 views
0 votes
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 2,423 views
0 votes
0 answers
+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,810 points
1,823 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,090 points
2,722 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
3,432 views