Regular Expression Help

I am trying to filter out all files beginning with letter Z for e.g. Z12345 or Z12E34and for that
I use regex [/^Z/], however it also filters out all the files that contains letter Z … like A12Z34 or 12345Z which i dont want. what could be the correct regular expression to filter out only fils beginning with letter Z?

Try this:


This means words beginning with the letter ‘Z’.

no it doesn’t work…it matches almost all characters even those that do not start with Z

^Z.* worked for me.


thanks Tim , it works