I have a small text file like
global #name1 you're present in a bad #name1.
local #name2 you're in the bad channel #name2, leave this chan now.
global #name3 you're in a spamming chan #name3, part it now.
and so on
i know how to read the file but i need to display the #name after the global or local only on each line and ignore the rest including global/local.