![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: RegExp - using the | operator. Topic Summary: Search for words e.g "speaker" or "Speaker" Created On: 29-May-2007 19:32 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: Krishna, A few months ago I posted my Global Search Utility which should do what your looking to achieve. See the following thread. https://support.telelogic.com/en/doors/forums/messageview.cfm?catid=17&threadid=4382 "Speaker" and "speaker" can both be searched for by turning match case off. - Martin | |
![]() |
|
I am working on a script to search for a word in the object text in all the modules of a folder using Regular Expressions. A string variable reads the text entered in a DB and assigns the value to a RegExp. RegExp stringToSearch = regexp(textEnteredDBE|firstCharacterUpper(textEnteredDBE)), I get an error. What is going wrong? |
|
![]() |
|
![]() |
|
For starters try changing RegExp to Regexp and add quotes around |
ie., Regexp stringToSearch = regexp(textEnteredDBE "|" firstCharacterUpper(textEnteredDBE)) This will get it to compile but to get your desired results you will need quotes around each outer parenthesis ie., Regexp stringToSearch = regexp "(" textEnteredDBE "|" firstCharacterUpper(textEnteredDBE) ")" A nit -- stringToSearch is not a very good variable name since it isn't a string -- it is a regular expression pattern. Also, textEnteredDBE had better be a string not a 'Dialog Box Element' which the suffix implies. Edited: 30-May-2007 at 11:52 by ron lewis |
|
![]() |
|
![]() |
|
Thanks, Ron, for the suggestion and pointing out the typos in my post. This is a real help as I can search for two words (with the first character in upper case) instead of one.
|
|
![]() |
|
![]() |
|
Krishna,
A few months ago I posted my Global Search Utility which should do what your looking to achieve. See the following thread. https://support.telelogic.com/en/doors/forums/messageview.cfm?catid=17&threadid=4382 "Speaker" and "speaker" can both be searched for by turning match case off. - Martin ------------------------- - Martin |
|
![]() |
|
![]() |
|
Hi Martin,
I posted my reply in the thread you pointed out. This is a very useful script, which will save all of us considerable amount of time. Thanks again - Krishna |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
RegExp - using the | operator.
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.