I have a file that I've read into memory and I would like to parse or search that particular string for all occurrences of "TEST_COMMAND". I could have commands like TEST_COMMAND.1, TEST_COMMAND.2, etc. I simply want to find all of these occurances of TEST_COMMAND and then split on the period (.) so I can get the data on the right of the period. For example, TEST_COMMAND.1 and TEST_COMMAND.2 would result in adding 1, 2 to the list.
I've been messing around with str.find and parse but can't seem to put anything together that will work. If any of you have some ideas I would love to hear them.
Here is some updated data. Need to parse a file with the following:
function TEST_CMD.OFF(uuid, uprm) function TEST_CMD.NUMBER_1(uuid, uprm)
Basically I would need to parse this file take whatever is aafter the . but before the (uuid, urpm). In this case I would like the output to be ['OFF', 'NUMBER_1']
Try something like this:
Update
Try
for your second question