I have following text in a file:
mysql_databases:
potato_mychat1:
- potato_mychat1
potato_phpb1:
- potato_phpb1
- potato_smf1
potato_phpb2:
- potato_phpb2
p_phpb282:
- potato_phpb282
potato_registry:
- potato_registryadmi
potato_smf1:
- potato_smf1
potato_smf2:
- potato_smf2
potato_wp82:
- potato_wp82
The pattern would be - potato_smf1.
Te first string ending with : above each match should be marked - so in this case potato_phpb1: and potato_smf1:.
I have tried many variations of positive lookbehind: (?<= - potato_smf)*: but can't get it right no matter what, I will appreciate any hints.