In Perl, you can think of slashes as something like double quotes with the added value โbetween these slashes is a regular stringโ. The first block of code is the Perl find / replace regex:
$stringvar =~ s/findregex/replaceregex/;
Takes findregex and replaces it with replaceregex , in place. This example is a very simple search, and the .net Regex class will be redundant. String.Replace() will do the job:
letter = letter.Replace("Users ", "") letter = letter.Replace("Mailboxes ", "")
The second part is Perl for search only, returns true if the found findregex string is found, and the actual string itself is not affected.
$stringvar =~ /findregex/;
String.Contains() can handle this in .net:
if (!(storegroup.Contains("Recovery") _ or storegroup.Contains("Users UVWXYZ") _ or storegroup.Contains("you get the idea"))) Then ...
(sorry if my VB is a little rusty, but hope this helps)
source share