Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic Rhapsody (steve huntington)
Decrease font size
Increase font size
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
Search Topic Search Topic
Topic Tools Topic Tools
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 17-Aug-2007 15:17
User is offline View Users Profile Print this message


Norbert Scherm

Posts: 5
Joined: 10-Aug-2007

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
Report this to a Moderator Report this to a Moderator
 23-Aug-2007 07:36
User is offline View Users Profile Print this message


Charlie Lane

Posts: 86
Joined: 16-Sep-2005

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
Report this to a Moderator Report this to a Moderator
 30-Aug-2007 16:18
User is offline View Users Profile Print this message


Norbert Scherm

Posts: 5
Joined: 10-Aug-2007

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
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic Rhapsody forum.
There are currently 1 users logged in.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.