all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: shirish <shirishreddy89@gmail.com>
To: Peter Dyballa <Peter_Dyballa@web.de>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Regarding replacing regexp
Date: Sat, 12 May 2012 16:09:48 +0530	[thread overview]
Message-ID: <CAAi7AJAazJ0xmgL=9=nwU5oyf=z7h7rj0rjsRnXkCjZdNJyJLA@mail.gmail.com> (raw)
In-Reply-To: <28BA2A50-EFBF-4F14-96FB-F3CE37B8CBC6@Web.DE>

[-- Attachment #1: Type: text/plain, Size: 1031 bytes --]

Thanks Peter


On Fri, May 11, 2012 at 2:09 PM, Peter Dyballa <Peter_Dyballa@web.de> wrote:

>
> Am 10.05.2012 um 11:37 schrieb shirish:
>
> > public static final String SUCCESS //Successmesg
> > public static final String FAILURE  //failuremessage
> >
> > I need to replace that with
> >
> > public static final String SUCCESS = "SUCCESS";//Successmesg
> > public static final String FAILURE  = "FAILURE"; //failuremessage
>
> You could try:
>
>        \(final \w+ \)\([A-Z]+\) -> \1\2 = "\2";
>
> The text "final <some word> " followed by a sequence of upper-case letters
> (\([A-Z]+\)) is found and saved in registers and substituted with the first
> finding followed by '=' and the found sequence of upper-case letters in
> double quotation marks followed by ';'. The remainder of the original line
> stays unchanged.
>
> --
> Greetings
>
>  Pete
>
> One cannot live by television, video games, top ten CDs, and dumb movies
> alone.
>                                – Amiri Baraka, 1999
>
>

[-- Attachment #2: Type: text/html, Size: 1506 bytes --]

      reply	other threads:[~2012-05-12 10:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-10  9:37 Regarding replacing regexp shirish
2012-05-10 16:26 ` Deniz Dogan
2012-05-11  2:57   ` XeCycle
     [not found]   ` <mailman.942.1336705240.855.help-gnu-emacs@gnu.org>
2012-05-11  3:10     ` Barry Margolin
2012-05-11  3:52       ` XeCycle
2012-05-12 10:39   ` shirish
2012-05-11  8:39 ` Peter Dyballa
2012-05-12 10:39   ` shirish [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAi7AJAazJ0xmgL=9=nwU5oyf=z7h7rj0rjsRnXkCjZdNJyJLA@mail.gmail.com' \
    --to=shirishreddy89@gmail.com \
    --cc=Peter_Dyballa@web.de \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.