Get number present after a particular pattern of a matching string in Python
问题 I want to get all the matching numbers(only numbers example '0012--22') or numbers which contain some text (example 'RF332') corresponding to it which matches with a list of strings provided("my_list" in the code). The format in which the text with number will be present is like separated by a space or two. Providing sample input file for reference. This is the input file: $cat input_file some text before Expedien: 1-21-212-16-26 some random text Reference RE9833 of all sentences. abc 123 456