一些UpperCase字符的正则表达式

时间:2022-09-29 00:02:31

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

有一个Windows程序支持搜索文件的正则表达式(或Dos表达式)。

(MythicSoft's FileLocator Pro)

(MythicSoft的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)

它支持*等通配符?我想找到只有4个字符的文件名与jpg格式我怎么能写一个短语呢?这句话(????。jpg)找到所有的小写和大写。(我把它的模式用于dos表达式)这个短语([AZ] [AZ] [AZ] [AZ] .jpg)不起作用!(我把它的模式放到正则表达式上)

thanks in advance

提前致谢

1 个解决方案

#1


3  

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

在线文档显示FileLocator Pro使用Perl兼容的正则表达式,在这种情况下,这应该工作:

^([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'

确保正则表达式的区分大小写选项已打开。转到在线文档并搜索区分大小写的正则表达式。它似乎在那里解释。它说'要使内容搜索区分大小写,请单击'Aa'按钮'

#1


3  

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

在线文档显示FileLocator Pro使用Perl兼容的正则表达式,在这种情况下,这应该工作:

^([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'

确保正则表达式的区分大小写选项已打开。转到在线文档并搜索区分大小写的正则表达式。它似乎在那里解释。它说'要使内容搜索区分大小写,请单击'Aa'按钮'