![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: DXl Fundamentals :-) Topic Summary: Created On: 10-May-2004 13:49 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Hi,
Hope someone can help me perform this fundamental operation. All I want to do is search within the object text for a specific word, and if that word is present then set an attribute accordingly. I tried Object o for o in current Module do { string ot = o."Object Text" if (ot == "Figure*") o."Object Type"="Comment" } however I seem to be using the wildcard conditions incorrectly and don't get a match. I know that if you are making a filter you can use 'contains' . Is this where I should be looking. Thanks for any help Neil |
|
![]() |
|
![]() |
|
Hi
If you ony require to match the word "Figure" amongst the Object Text , have you considered using a regular expression? The following might help:- filtering off Regexp isFigure = "Figure" for o in m do { thisText =o."Object Text" if isFigure thisText then { accept o // or set another attribute with a particular value } else { reject o } } filtering on dave mc |
|
![]() |
|
![]() |
|
The RegExpr should work. Also consider using the "findRichText" command. It will get the exact "offset" so long as the original string is in fact RAW text. Text = o."Object Text" does retrieve raw text, but Text = richText(o."Object Text") doesn't, and the offset is useful only in subsequent richText commands cut and replace.
- Louie |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
DXl Fundamentals :-)
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.