all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Rivka Miller <rivkaumiller@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Quickie - Regexp for a string not at the beginning of the line
Date: Thu, 25 Oct 2012 18:08:53 -0700 (PDT)	[thread overview]
Message-ID: <73f60cf3-d932-4366-a405-6767488560c6@q16g2000yqc.googlegroups.com> (raw)
In-Reply-To: e6f60702-d85f-4aed-bc03-3147bb007ad8@googlegroups.com

On Oct 25, 2:27 pm, Danny <dann90...@gmail.com> wrote:
> Why you just don't give us the string/input, say a line or two, and what you want off of it, so we can tell better what to suggest

no one has really helped yet.

I want to search and modify.

I dont wanna be tied to a specific language etc so I just want a
regexp and as many versions as possible. Maybe I should try in emacs
and so I am now posting to emacs groups also, although javascript has
rich set of regexp facilities.

examples

$hello$ should not be selected but
not hello but all of the $hello$ and $hello$ ... $hello$ each one
selected

=================
original post
=================


Hello Programmers,

I am looking for a regexp for a string not at the beginning of the
line.

For example, I want to find $hello$ that does not occur at the
beginning of the string, ie all $hello$ that exclude ^$hello$.

In addition, if you have a more difficult problem along the same
lines, I would appreciate it. For a single character, eg < not at the
beginning of the line, it is easier, ie

^[^<]+<

but I cant use the same method for more than one character string as
permutation is present and probably for more than one occurrence,
greedy or non-greedy version of [^<]+ would pick first or last but not
the middle ones, unless I break the line as I go and use the non-
greedy version of +. I do have the non-greedy version available, but
what if I didnt?

If you cannot solve the problem completely, just give me a quick
solution with the first non beginning of the line and I will go from
there as I need it in a hurry.

Thanks



       reply	other threads:[~2012-10-26  1:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <9eba5652-f814-41fa-83e4-460bca2be264@n16g2000yqi.googlegroups.com>
     [not found] ` <e6f60702-d85f-4aed-bc03-3147bb007ad8@googlegroups.com>
2012-10-26  1:08   ` Rivka Miller [this message]
2012-10-26  2:00     ` Quickie - Regexp for a string not at the beginning of the line Ed Morton
2012-10-26  2:11     ` Ben Bacarisse
2012-10-26  4:45       ` Rivka Miller
2012-10-26 12:11         ` Ben Bacarisse
2012-10-26 12:32         ` Ed Morton
2012-10-26  2:19     ` PJ Weisberg
2012-10-26 12:02       ` Doug Lewan
2012-10-26  3:22     ` anon

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=73f60cf3-d932-4366-a405-6767488560c6@q16g2000yqc.googlegroups.com \
    --to=rivkaumiller@gmail.com \
    --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.