UML依赖关系reliationship(UML dependency reliationship)
我找不到我的问题的答案。 两个班级之间的依赖关系可以有多少限制? UML类图一般不能在两个类之间具有多个相同类型的reaationship,但是它们可以具有2个或更多不同类型的reliationship(例如,在两个类之间它们都可以具有组合和泛化依赖性?
I can't find answer for my question . Is there a limit to how much dependency reliationship can be between two classes ? Does UML class-diagrams in general can't have more than one reliationship of the same type between two classes but they can have 2 or more reliationship of different types (for example between two classes they both can have composition and generalization reliantionship ?
原文:https://stackoverflow.com/questions/42076506
最满意答案
您需要选择正确的正则表达式并正确使用它。 如果首先将RE存储在变量中,尤其是使用大型正则表达式,这可以减少混乱,但即使在这种情况下,它也可以帮助您理解文字RE与其使用方式之间的差异。
set RE {^[\"\{]} if {[regexp $RE $theString]} { puts "something" }
请注意,默认情况下,Tcl不会锚定其RE匹配,因此如果您只是确定RE是否匹配,则不需要前导或尾随
.*
You need to pick the right regular expression and use it correctly. This can get a lot less confusing if you store the RE in a variable first, particularly with large regular expressions, but even in this case it helps you understand the difference between the literal RE and how it is used.
set RE {^[\"\{]} if {[regexp $RE $theString]} { puts "something" }
Note that Tcl does not anchor its RE matching by default, so you don't need a leading or trailing
.*
if you are just determining if a RE matches.
相关问答
更多-
使用RegExp验证(Validate with RegExp)[2022-07-01]
@ aliteralmind的答案非常适合检查他们是否搞砸了。 如果你想在同一步骤中进行额外的解析,你需要消极的前瞻,例如^(?!(?:-|\s*)$).* ?: ^(?!(?:-|\s*)$).* 。 @aliteralmind's answer is great for checking to see if they screwed up. If you want to do additional parsing in the same step, you'll need negative lookah ... -
你可以使用像其他人一样的前瞻性断言。 或者,如果您只想使用基本的正则表达式语法: ^(.?$|[^m].+|m[^y].*) 这可以匹配零或一个字符长的字符串( ^.?$ ),因此不能是my 。 或两个或多个字符的字符串,其中当第一个字符不是m可能会跟随( ^[^m].+ ); 或者如果第一个字符是一个m则不能跟随y ( ^m[^y] )。 You could either use a lookahead assertion like others have suggested. Or, if you j ...
-
RegExp匹配行不以at符号开头[duplicate](RegExp match lines NOT starting with at-symbol [duplicate])[2022-12-20]
你的模式很好,除了两件事: 你需要一个前瞻(后面跟着) ,而不是一个外观 你需要在行的开头锚定你的模式 所以,如果你逐行阅读文本: ^(?![ \t]*@).+ 如果您阅读整个文本,则需要使用多行修饰符使^匹配行的开头(默认情况下不匹配字符串的开头): (?m)^(?![ \t]*@).+ (或另一种打开此m修饰符的方法) Your pattern was good except two things: you need a lookahead (followed with), not a lookbe ... -
regexp如果以\ {或\“开头(regexp if start with \{ or \")[2023-11-15]
您需要选择正确的正则表达式并正确使用它。 如果首先将RE存储在变量中,尤其是使用大型正则表达式,这可以减少混乱,但即使在这种情况下,它也可以帮助您理解文字RE与其使用方式之间的差异。 set RE {^[\"\{]} if {[regexp $RE $theString]} { puts "something" } 请注意,默认情况下,Tcl不会锚定其RE匹配,因此如果您只是确定RE是否匹配,则不需要前导或尾随.* You need to pick the right regular expres ... -
Regexp Filter Boost(Regexp Filter Boost)[2022-01-02]
这似乎给了我想要的结果: { "query": { "bool": { "must": [ { "query_string": { "query": "frank", "default_operator": "AND" } }, { "term": { "site_id": { ... -
/
(?!/ /
(?!/
-
Regexp groovy(Regexp groovy)[2022-05-24]
这应该工作正常: ^(\w+): (.+)$ 第一个匹配组将给出第一个单词(例如ErrorID ),其次是第二个单词(例如blabla )。 确切的实现取决于您使用的编程语言。 This should work fine: ^(\w+): (.+)$ First match group will give the first word (e.g. ErrorID), second the rest (e.g. blabla). Exact implementation would depend on t ... -
是的 (^05[0-9\-\.]{8,12}) 和例子: https://regex101.com/r/uI1hT8/2 Thy this. (^05[0-9\-\.]{8,12}) and example: https://regex101.com/r/uI1hT8/2
-
在MYSQL中使用REGEXP查找以特殊字符开头的记录(find records starting with special characters using REGEXP in MYSQL)[2023-07-02]
使用' ^[^a-zA-Z] '作为正则表达式 这意味着什么 首先^是“锚定到行的开头” [是一个角色类的开始 ^在字符类中意味着否定这个类 - 所以匹配其中的字符的相反 az是小写英文字母 AZ是大写的英文字母 ]是字符类的结尾 由于班级是自己的,它代表一个角色 因此,regexp意味着“匹配不是az或AZ的行开头的任何字符”在SQL表达式的上下文中,这应匹配任何不以az或AZ开头的结果 use '^[^a-zA-Z]' as the regexp What this means First ^ is " ... -
我会使用substring和instr来替换破折号之前的所有内容,但是这是使用regexp的答案: WITH aset AS (SELECT 'CR-123456' a FROM DUAL UNION ALL SELECT 'BCY-12345' a FROM DUAL UNION ALL SELECT 'ECR-499494' a FROM DUAL ...