Need Help - Regular Expressions in Watch Topics
Posted: Tue Jun 25, 2013 7:46 am
I working on my watch topics and have very little experience with regular expressions. If I'm looking for a person named Sam Cook and use that name as a watch topic it finds "Sam Cook" and "Cook, Sam" (good) but also finds names like Sam Lacook or Cooke, Sam (unwanted).
(Sam*.Cook) works properly except Sam and Cook have to be in that order so I have to use (Sam*.Cook)|((Cook*.Sam). Can someone experienced in regular expressions explain the functions of "()", "*", "." and especially "*." (I understand | = or). I've looked in several books and/or reference guides on regular expressions but really can't get it into my head how (Sam*.Cook) functions (I guess I need a "grade school level" explanation.
Edit:
Why does Rescan Topic with "Crange" or "(Crange)" give one match but the same Rescan Topic with "(Sam*.Cook)|(Cook*.Sam)|(Crange)" shows no matches???
(Sam*.Cook) works properly except Sam and Cook have to be in that order so I have to use (Sam*.Cook)|((Cook*.Sam). Can someone experienced in regular expressions explain the functions of "()", "*", "." and especially "*." (I understand | = or). I've looked in several books and/or reference guides on regular expressions but really can't get it into my head how (Sam*.Cook) functions (I guess I need a "grade school level" explanation.
Edit:
Why does Rescan Topic with "Crange" or "(Crange)" give one match but the same Rescan Topic with "(Sam*.Cook)|(Cook*.Sam)|(Crange)" shows no matches???