span8
span4
嗨社区亚搏国际在线官网。
我期待改善一些工作台,并让他们稍微自动化。
一个我目前的工作都是围绕着构建数据的一些高度,从字符串中提取类(如下图所示)。目前我使用的AttributeValueMapper这个手动转换出来,但如果有办法做到这一点无需手动设置那将是梦幻般的(如果添加了新的数据/类,我们不需要回来和编辑值以地图。
这是什么来的AttributeValueMapper出来的截图。的状态属性是源值和lay_class属性是目标值。
我提取类是大写字母(一个数字,但会有更多的未来)对字符串的结尾。我知道有一个正则表达式的表达式来提取大写字母,其是最接近的自动化解决方案,我发现(条件包括多于一个大写字符),所以它可以是与另一种表达一个组合。
任何想法将是非常美妙。
干杯。
假设你正在寻找:
那么下面的正则表达式应该在你的StringSearcher工作:
\ B [A-Z] [A-Z0-9]?\ b
Thanks for this Arnold.
Worked like a charm, I had a moment the first run where all I was getting was the word 'of' as the extracted string but when I went back and ensured that case sensitive was set to yes everything went perfect.
Thanks very much mate.
实际上,这就是StringSearcher是,但是,是的,正则表达式是去与它要概括查找的方式。
为了概括正则表达式,你应该定义什么是“规则”的lay_class信服从。如:
一旦你的,那么它是编码的一个问题是进入正则表达式。例如,这个表达式使用上述规则适用于您的样品:
\ B [A-Z] + \ d * \ b
这个规定它必须:
在您的源数据的不同排列可以任意数量的正则表达式在线测试仪等来试用https://regex101.com/
Hi bwn.
Thanks for this, it was just about perfect.
We just needed to add the possibility of the second letter with a second [A-Z].
Thanks very much for the reply mate.
@michaelbreenOops, I missed the last example of "RL".In this case, all that is needed is a "+" to [A-Z] to indicate it can be 1 or more consecutive capital letters at the start.The "\d*" bit will then say the number suffix is optional and can be zero or more digits long.
I've modified the Answer above.As you say too, you will need StringSearcher to be set to respect capitalisation.
©2020安全亚搏在线软件公司|法律