![]() |
Telelogic Rhapsody (steve huntington) | ![]() |
Topic Title: Regular Expression / Sub expression, how does it work? Topic Summary: Created On: 17-Aug-2007 15:17 Status: Read Only |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Hi, it's me again,
I'am trying to find out how the "Regexp" evaluation in the Rhapsody gateway works. There is an input box where a regular expression can be specified. If you have several (...) brackets in the regexp they return different groups "Group 1" , "Group 2", each corresponding to each pair of brackets. Can I specify a replacement rule by "Sub expression", e.g. "%3 %2 %1" to concatenate the groups in reverse order? How does this mechanism work? Is there a good documentation about using Regexp in the gateway? Thanks in advance Norbert |
|
![]() |
|
![]() |
|
Hi Norbert,
I have found the documentation in Gateway (and the error messages) very poor and I'd recommend raising a call with support to log a defect where aspects are unclear, so that if enough users complain they will get the Gateway team to prioritise provision of better documentation. On your problem, I've used regular expressions in the types to extract requirement ID and requirement text from Word and DOORS, but no clever rearrangement like your posting implies --- could you say a bit more about what you're trying to do with the regex, e.g. what is the form of what you are analysing, what are you replacing, is it for IDs or text? Regards, Charlie |
|
![]() |
|
![]() |
|
Hi, Charlie,
I agree, documentation is, close to nothing. I found that some of the RegExp engines provide the opportunity to nest RegExpRessions. I.E. whenever you put brackets in the RegExp the code which is processed within the brackets is returned as "Return Value", when using multiple bracket pairs, you obtain multiple return values. As I found "Regular Expression" and "Sub Regular Expression" I thought that this characterizes one Nesting Level for Regular Expressions. However I don't know how to adress the return values in the Sub expression - and still don't have a solution. Still work on the Problem.... Norbert |
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.