ule子中filename-regex-filter模式的语法 [英] syntax for filename-regex-filter pattern in mule

查看:66
本文介绍了ule子中filename-regex-filter模式的语法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Am使用MULE文件入站端点仅提取csv文件进行处理.无法弄清楚如何指定文件名的正则表达式模式.如果我也可以指定文件名的前几个字符会更好,例如in_ * .csv(文件名应以in_开头,并且应为csv文件)

Am using MULE file inbound endpoint to pickup only the csv files for processing. Couldn't figure out how to specify the regex pattern of the file name. It would be better if I can specify the first few characters of the file name as well e.g. in_*.csv (file name should start with in_ and should be a csv file)

现在,我已经指定了这样的名称. file:filename-regex-filter pattern =.csv" caseSensitive ="false"

Right now, I have specified like this. file:filename-regex-filter pattern=".csv" caseSensitive="false"

但是不起作用.有人可以帮我找到合适的语法吗?

But not working. Can somebody help me out in finding the right syntax for this?

推荐答案

这应该做到:

in_(.*).csv

()包含一个表达式

.匹配任何单个字符

*与前面的表达式的0个或多个重复匹配

* matches 0 or more repeats of the preceding expression

因此,这意味着匹配字符串的开头和结尾,并在中间允许任意数量的任何字符".如果需要更复杂的表达式,有很多正则表达式教程和在线正则表达式匹配测试工具.

So this means "match the start and end of the string, and allow any number of any characters in-between". There are plenty of regex tutorials and online regex matching test tools, if you need more complex expressions.

这篇关于ule子中filename-regex-filter模式的语法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆