|
It is interesting that the find/replace help text for the "text editor" used by default with Java (and by selection with iProjects) has a help page that lists the $1, $2, $3, etc. capturing group replacement fields. The \R expression is useful with the text editor, but still can't be used for find or replace in the RDP LPEX editor.
I have raised an RFE to have RDP's LPEX editor's find/replace regular expressions and the corresponding help text aligned. Hopefully (with enough votes) they will increase the functionality of the LPEX editor's regular expressions, but accurate help pages might be just as useful.
https://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=20228
Please vote.
-Paul
-----Original Message-----
From: wdsci-l-bounces@xxxxxxxxxxxx [mailto:wdsci-l-bounces@xxxxxxxxxxxx] On Behalf Of Tyler, Matt
Sent: 14 March 2012 21:35
To: Rational Developer for IBM i / Websphere Development Studio Client for System i& iSeries
Subject: Re: [WDSCI-L] Compare showing sequence number differences - offtopic
I just tried and no, since LPEX will not search over the prefix area.
It just modified the source line like below
// MOD# PCR# PGMR DATE DESCRIPTIONR// MOD# PCR# PGMR
DATE DESCRIPTIONR
The help is the java.util.regex Class Pattern help. Seems that there
is not enough standardization in REGEX.
Thanks, Matt
-----Original Message-----
From: wdsci-l-bounces@xxxxxxxxxxxx [mailto:wdsci-l-bounces@xxxxxxxxxxxx]
On Behalf Of Vern Hamberg
Sent: Wednesday, March 14, 2012 2:25 PM
To: Rational Developer for IBM i / Websphere Development Studio Client forSystem i& iSeries
Subject: Re: [WDSCI-L] Compare showing sequence number differences - offtopic
This is nice - however, I don't use iProjects - does this also work in the LPEX editor? When I do a search/replace and specify to use regular expressions? I'm asking cuz I can't take the time just now to try it.
Thanks
Vern
On 3/14/2012 3:05 PM, Tyler, Matt wrote:
Open a member from the iProjects using the "Text Editor", in find\R
capture whatever you want and replace with whatever you want BUT put
for each new line replaced / added.[mailto:wdsci-l-bounces@xxxxxxxxxxxx]
Example:
Before:
001000000000 // MOD# PCR# PGMR DATE DESCRIPTION
Find / Replace:
(00100)(0)(000000 // MOD# PCR# PGMR DATE DESCRIPTION)
$1$2$3\R$19$3\R
After:
001000000000 // MOD# PCR# PGMR DATE DESCRIPTION
001009000000 // MOD# PCR# PGMR DATE DESCRIPTION
Thanks, Matt
-----Original Message-----
From: wdsci-l-bounces@xxxxxxxxxxxx
On Behalf Of Vern Hamberguses
Sent: Wednesday, March 14, 2012 1:43 PM
To: Rational Developer for IBM i / Websphere Development Studio Client
forSystem i& iSeries
Subject: Re: [WDSCI-L] Compare showing sequence number differences -
offtopic
Nice, Paul - I'm glad to be corrected - maybe it's always been there,
but the help was not helpful, as I recall.
I realized I should've explained the backslash quoting the TextPad
- next time, eh?second,
I'll definitely take a look again - and I hope there's a special code
for newline and all that.
Thanks
Vern
On 3/14/2012 8:47 AM, Paul Bailey wrote:
The \1 capturing group replacement stumped me at first, until Irealised it was $1 not \1 for the first replacement, $2 for the
etc. I'm not sure when this appeared, I can't see it documentedThe
anywhere, and I can't remember where I saw it first, but it works.
Google says it has been mentioned before on WDSCI-L back in 2006:
http://archive.midrange.com/wdsci-l/200605/msg00295.html
Some flavours of regular expression differ in minor ways, I guess.
RDP help pages take you to the java.util.regex.Pattern javadoc forbugs
regular expression help, but the capturing group replacement values
aren't right, so maybe there are other minor differences. (Such as the
inability to use \n as a replacement value.) I wonder if these are
or misleading/erroneous documentation.Client
-Paul.[mailto:wdsci-l-bounces@xxxxxxxxxxxx] On Behalf Of Vern Hamberg
-----Original Message-----
From: wdsci-l-bounces@xxxxxxxxxxxx
Sent: 14 March 2012 12:43
To: Rational Developer for IBM i / Websphere Development Studio
for System i& iSeriesis
Subject: Re: [WDSCI-L] Compare showing sequence number differencesavailable in replacement strings - that's the main thing - searching
Hi Paul
I've found that things like \1 for preserving found text are not
pretty good, replacing is lacking.of
Now maybe there's more in 8.03 - I've not explored that - have theyimproved the support?
I'm in the LPEX editor - it seems that maybe the Eclipse editor isbetter, but I've never used that for RPG or CL source.
I'll reply privately on the RTC stuff, at least for now. No biggie.statement requires you to move source outside of RDP? I can't work out
Vern
On 3/14/2012 7:20 AM, Paul Bailey wrote:
The regex features in RDP are reasonably good. What kind of regex
inserting newlines, but everything else seems to work as you'd expect.
Incidentally, you mentioned moving to Rational Team Concert in one
your recent posts. I'd be very interested to hear about yourexperiences
with installing and using RTC with RDP (and iProjects) as we are alsoof
considering it but the move to iProjects is putting me off researching
too much further. Do you have a blog or something to write that kind
report up on?text
Client-Paul
-----Original Message-----
From: wdsci-l-bounces@xxxxxxxxxxxx
[mailto:wdsci-l-bounces@xxxxxxxxxxxx] On Behalf Of Vern Hamberg
Sent: 14 March 2012 11:42
To: Rational Developer for IBM i / Websphere Development Studio
for System i& iSeries
Subject: Re: [WDSCI-L] Compare showing sequence number differences
:-) I hear you - the eclipse compare is very nice for regular
thingsside-by-side compare in Textpad, but it does show diffs. I'm surefiles, although I still use TextPad for that - I have not seen a
like Notepad II or whatever the name are similar.just
Trouble with comparing source -without SourceLanding's tool - is
what was described here - source dates are involved. This uses thethe
Eclipse compare, I believe.
just went looking, because I thought it was there. I think it's likeNow there is another compare tool - it is under the Edit menu - I
old CODE compare tool - it might be the LPEX editor tool - the onethat
the setting to ignore sequence numbers might relate to.be
name, so far as I can see - I had to go to the Edit menu - there mayThe latter tool is not accessible from a right-click on the member
a shortcut, I don't know after a quick look-see.copy
pink (red)and yellow highlighting.But take a look at this one - it shows the changes intermingled in
there, then use the really powerful regex functionality there, thenBTW, I use Textpad for Search/Replace - I copy a block of source
the block back in to the LPEX editor.--
HTH
Vern
This is the Rational Developer for IBM i / Websphere Development Studio Client for System i& iSeries (WDSCI-L) mailing list To post a message email: WDSCI-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/wdsci-l
or email: WDSCI-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at http://archive.midrange.com/wdsci-l.
--
This is the Rational Developer for IBM i / Websphere Development Studio Client for System i& iSeries (WDSCI-L) mailing list To post a message email: WDSCI-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/wdsci-l
or email: WDSCI-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at http://archive.midrange.com/wdsci-l.
Scanned by MailDefender - managed email security from intY - www.maildefender.net
Important
This email transmission and any files with it are strictly
confidential to the intended recipient and may be legally
privileged. Any views or opinions presented are solely
those of the author and do not necessarily represent those
of BHSF. If you are not the intended recipient, you must
not copy, disclose or distribute its contents in any way.
If you have received this e-mail in error, please notify
the sender and delete the e-mail from your system.
We have taken steps to ensure this e-mail and attachments
are free from any virus but do not accept any
responsibility once this e-mail has been transmitted. You
should scan any attachments for viruses.
No contract may be concluded on behalf of BHSF Limited by
e-mail.
Registered Office:
BHSF Limited
Gamgee House, 2 Darnley Road, Birmingham B16 8TE.
www.bhsf.co.uk
Registered in England number 35500.
BHSF is authorised and regulated by the Financial Services
Authority.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.