× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



For your RFE example I certainly think there are easier alternatives. I usually just paste my SQL script stream text into a blank CLLE member with RUNSQL SQL('') COMMIT(*NONE) command and let RDi reformat for me.

But there have been many many times when the server source gets translated into a form that I cannot use the multi-line REGEX. I even have troubles with begin and end line matches being found properly. For instance, I like to add a space between open and close parens and their content so that it's easier to read and I can use the work stop token of space to land on when using CTRL+Left or Right arrow keys (see this RFE to add to those word stop tokens http://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=82107). When code wraps across lines then my REGEX does not work 100%.

If the RFE gets the documents updated then its worth it.

If you want a better quick list of REGEX matching commands then use CTRL-H and activate the "File Search" tab. In the "Containing Text" you can press CTRL+Space to see a list. Regular Expression option must be checked first.

Thanks, Matt


-----Original Message-----
From: WDSCI-L [mailto:wdsci-l-bounces@xxxxxxxxxxxx] On Behalf Of Buck Calabro
Sent: Thursday, April 14, 2016 4:19 PM
To: wdsci-l@xxxxxxxxxxxx
Subject: Re: [WDSCI-L] RFE: Regular expression scan AND replace

On 4/14/2016 6:05 PM, John Yeung wrote:
I consider myself a light-to-moderate regex user, and I have almost
never used backrefs. For the example you presented in your RFE, my
first thought was "Can I do multiline regexes, because if I can, then
I can try to match on single newlines, skipping pairs of newlines, and
replace them all with space, plus-sign, newline." My second thought
was "If I can't do multiline regexes in the editor, then it's probably
time for me to just write a simple Python script that I will use
whenever I want to CLP-ify *any* of my SQL scripts." ;)

In light of Vern's message, does this mean you're going to withdraw
your request? Or maybe request that the syntax be modified to allow
backslash as well as dollar sign for backrefs?

I added a comment that the docs need to be updated.

However.

Multi-line regexes don't work either. Maybe I need to pull the first RFE and create a second. I'll see what the IBM team think when they get to it.

I'm not averse to using Python to transform a script, but I tend to have multiple functional blocks in a single text file, so I don't want to convert the whole thing in one go - I only want to convert selected lines. Else I'd use awk. Or sed.

I don't want to come across as a complainer - I only want the community to tell IBM whether my personal wish list is something IBM should spend time on :-) The best way to do that is by creating an RFE. If the community likes the idea, it'll get voted up. If not, well there's always N++ for those niggling things :-)

--
--buck

Visit wiki.midrange.com and register for an account. Edit a page that helps you, and because it's public, you'll help someone else, too!

--
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.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.