在业务规则中使用StartsWith进行字符串比较 [英] Using StartsWith for String Comparision in Business rules

查看:72
本文介绍了在业务规则中使用StartsWith进行字符串比较的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要比较特定字符串是否以某些预定义的前缀开头。这些必然会不时发生变化,因此我们希望使用业务规则引擎。我们使用"值列表"声明了前缀。 vocab和
定义了该集合。现在,我希望使用String.StartsWith()方法,但无法理解它是否可以使用。

I need to compare whether a particular string starts with some pre-defined prefixes. These are bound to change from time to time and hence we wanted to use the business rule engine for this. We declared prefixes using "list of values" vocab and defined the set. Now, I hoped to use the String.StartsWith() method but couldn't understand if it can be used.

截至目前,我们正在创建一个方法,并将调用2个参数。一个字符串和另一个是我们希望字符串开始的值列表之一。有没有更好的方法呢?

As of now, we are creating a method and that will be called with 2 parameters. One the string and other is one of the list of values which we want the string to start with. Is there any better way to do this?

Praveen Behara

MCST:BizTalk Server 2006 R2,2010

Praveen Behara
MCST : BizTalk Server 2006 R2, 2010

推荐答案

Praveen,

Praveen,

您可以考虑使用MATCH谓词并提供适当的正则表达式。

You could consider using the MATCH predicate and provide an appropriate regular expression.

谢谢,

Murugesan M

Murugesan M


这篇关于在业务规则中使用StartsWith进行字符串比较的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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