Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #10240

Re: search replace with regex

From Roedy Green <see_website@mindprod.com.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: search replace with regex
Date 2011-11-25 13:46 -0800
Organization Canadian Mind Products
Message-ID <mi20d7dt3qgn4mbdahl3gt0dgo7lkr5f6f@4ax.com> (permalink)
References <ajjuc752tol3mcbrnlmlup7l5a29aadnuu@4ax.com> <lVKzq.74340$SW4.56763@newsfe08.iad>

Show all headers | View raw


On Fri, 25 Nov 2011 07:24:00 -0400, Arved Sandstrom
<asandstrom3minus1@eastlink.ca> wrote, quoted or indirectly quoted
someone who said :

>
>On Windows I use Notepad++ or Powershell for the general case (where
>it's _not_ source code in an IDE).

For source code IntelliJ has Java regexes built into the IDE is a
quite convenient way.  The problem mostly is scanning content for the
website which is mostly HTML or embedded macros to do bulk changes.

For this I need something quite quick with the ability to handle
multiple files and multiple regexes per pass. 

I will have a look for PowerShell.

If I write my own, I will build in a regex proofreader than lets you
see by colour which chars are being taken literally and which as
commands. It could also make sure () [] balance etc.

It has also dawned on me that XML is a quite reasonable language to
define scripts.  You can create it with a gui.  You can play with in
with XML tools safely. You can edit it externally. It already has a
mechanisms for comments, handling awkward characters and treating
multiple spaces as significant.  It is easy for others to generate
with custom apps since they can avoid dealing with some of the messy
details.

-- 
Roedy Green Canadian Mind Products
http://mindprod.com
I can't come to bed just yet. Somebody is wrong on the Internet. 

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

search replace with regex Roedy Green <see_website@mindprod.com.invalid> - 2011-11-25 00:17 -0800
  Re: search replace with regex Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-11-25 07:24 -0400
    Re: search replace with regex Roedy Green <see_website@mindprod.com.invalid> - 2011-11-25 13:46 -0800
      Re: search replace with regex Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2011-11-26 15:24 -0800
      Re: search replace with regex bugbear <bugbear@trim_papermule.co.uk_trim> - 2011-12-13 09:29 +0000
  Re: search replace with regex Arne Vajhøj <arne@vajhoej.dk> - 2011-11-25 17:09 -0500
    Re: search replace with regex JussiJ <jussij@zeusedit.com> - 2011-12-12 20:15 -0800
      Re: search replace with regex Lew <lewbloch@gmail.com> - 2011-12-13 07:55 -0800

csiph-web