samedi 14 avril 2018

Extract the line where some number [range 1-6] followed by a character at the beginning or end of the number in python

I have a txt file with lots of line including number and string.I need to Print the whole line where I find some number with or without followed by a character in the beginning or end of the number.I want to search with the ETEXT NO in my file show the corresponding title and author and also the ETEXT NO. I tried some pattern["^[a-zA-Z]\d{1,6}$enter image description here"] but not working.

Aucun commentaire:

Enregistrer un commentaire