Hello AnitaP,
Since regex are complicated to understand , let me try to explain what it does here
1) The first Regex is \\\\.*\\Autorun\.inf
shall break this into three parts,
Part 1) \\\\
Part 2) .*\\
Part 3) Autorun\.inf
Part 1) \\\\
a) \ is an escpace charector , if you want to write \s you will write \s but if you want to write only \ then you write \\ .
so the Part 1 becomes \\
Part 2) .*\ ( one \ is escape so it will be *.\ )
Dot . matches any charector
* any preceeding charector of part 3
ex:
one charectory + zeror or more of any preceeing chqrector of \ , (anything before \ format)
these could be of the form
temp\y\xy\1235\
Part 3: Autorun\.inf
\ nothing but escaping the dot so it will be Autorun.inf
This is what the first one would do
\\servername\c$\temp\temp2\temp3\temp4\temp6\.................\till it finds it\autorun.inf
matching Examples
\\servername\c$\temp\temp2\temp3\temp4\temp6\autorun.inf
\\temaaaaaaaaaaa\daaaaaaaaaaaaaa\autorun.inf
\\c\test\autorun.inf
\\servername\autorun.inf
===================
second one is for local drive
[^\\]*\\Autorun\.inf
^ meaning not, so any path which does not start with \\
it will be match
C:\autorun.inf
and
c:\windows\sxx\yy\autorun.inf
your USB or local drive does not start with \\ ( if you are not accessing it remotely )
you will use the second one, if you are accessing network you will be using first reg ex