0

there is a windows program that supports Regular Expression (or Dos Expression) for search files.

(MythicSoft's FileLocator Pro)

it supports wildcards such as * ?
i want to find only 4 characters file names with jpg format
how can i write a phrase for that?
this phrase (????.jpg) finds all lower and upper cases.(i put it's mode to dos expression)
also this phrase ([A-Z][A-Z][A-Z][A-Z].jpg) Does not work!(i put it's mode to regular expression)

thanks in advance

SilverLight
  • 19,668
  • 65
  • 192
  • 300

1 Answers1

3

Online documentation shows that FileLocator Pro uses Perl compatible regular expressions, in which case, this should work:

^([A-Z]{4}\.jpg)$

The parentheses make the whole thing a capture group. If you don't need the capture group, just remove the parentheses.

Edit:

Make sure that the case sensitive option is on for regular expressions. Go to the online documentation and search for regular expression case sensitive. It appears to be explained there. It says 'To make the content search case sensitive click the 'Aa' buttons'

SilverLight
  • 19,668
  • 65
  • 192
  • 300
alan
  • 4,752
  • 21
  • 30
  • really thanks for help / but still does not work -> http://www.boost.org/doc/libs/1_44_0/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html i do n't know what is the problem! – SilverLight May 05 '12 at 10:17
  • Are you sure the `jpg` is lower case? You might want to post some sample files names taken directly from the file system just to verify some real input. – alan May 05 '12 at 10:20
  • yes, ([A-Z]{4}\.jpg) finds many jpg files more than 4 characters and ^([A-Z]{4}\.jpg)$ finds all lower and upper cases... – SilverLight May 05 '12 at 10:21
  • i edit my prev comment | i think there is something wrong about their software! – SilverLight May 05 '12 at 10:26
  • I don't know anything about FileLocator, but there must be a setting somewhere that makes your regular expressions case sensitive. Make sure that's on. – alan May 05 '12 at 10:26
  • would you please install this software and help me about this problem.would be really really appreciate for that.i was working some hours on it... – SilverLight May 05 '12 at 10:28