Path: csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'python,': 0.02; 'perl,': 0.07; 'literal': 0.09; 'occurrences': 0.09; 'subject:string': 0.09; 'subject:not': 0.11; 'suggest': 0.11; 'yet.': 0.13; 'language': 0.14; '(other': 0.16; 'danny': 0.16; 'from:addr:mrabarnett.plus.com': 0.16; 'from:addr:python': 0.16; 'from:name:mrab': 0.16; 'message-id:@mrabarnett.plus.com': 0.16; 'oct': 0.16; 'received:84.93': 0.16; 'received:84.93.230': 0.16; 'regex,': 0.16; 'two,': 0.16; 'wrote:': 0.17; 'differ': 0.17; 'examples': 0.18; 'versions': 0.20; 'this:': 0.23; 'header:In- Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'common': 0.26; 'set.': 0.27; 'multiline': 0.29; 'received:192.168.1.3': 0.29; 'maybe': 0.29; 'received:84': 0.32; 'could': 0.32; 'to:addr :python-list': 0.33; 'languages': 0.33; 'pm,': 0.35; 'posting': 0.35; 'there': 0.35; 'really': 0.36; 'except': 0.36; 'but': 0.36; 'should': 0.36; 'why': 0.37; 'subject:: ': 0.38; 'possible.': 0.38; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'received:192.168': 0.40; 'most': 0.61; 'first': 0.61; 'different': 0.63; 'within': 0.64; 'dont': 0.64; 'header:Reply- To:1': 0.68; 'miller': 0.69; 'reply-to:no real name:2**0': 0.72; 'modify.': 0.84; 'reply-to:addr:python.org': 0.84; 'tied': 0.93 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.0 cv=YaM/Fntf c=1 sm=1 a=0nF1XD0wxitMEM03M9B4ZQ==:17 a=b2nRVtXOy8EA:10 a=IRuoXFj7-j0A:10 a=ihvODaAuJD4A:10 a=OUOv7kDek9cA:10 a=8nJEP1OIZ-IA:10 a=EBOSESyhAAAA:8 a=8AHkEIZyAAAA:8 a=OMDHiQJKowQA:10 a=pGLkceISAAAA:8 a=YA_tXJZuWTgl8oHiuWQA:9 a=wPNLvfGTeEIA:10 a=MSl-tDqOz04A:10 a=0nF1XD0wxitMEM03M9B4ZQ==:117 X-AUTH: mrabarnett:2500 Date: Fri, 26 Oct 2012 03:11:48 +0100 From: MRAB User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Quickie - Regexp for a string not at the beginning of the line References: <9eba5652-f814-41fa-83e4-460bca2be264@n16g2000yqi.googlegroups.com> <73f60cf3-d932-4366-a405-6767488560c6@q16g2000yqc.googlegroups.com> In-Reply-To: <73f60cf3-d932-4366-a405-6767488560c6@q16g2000yqc.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: python-list@python.org List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 36 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1351217512 news.xs4all.nl 6843 [2001:888:2000:d::a6]:59363 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:32180 On 2012-10-26 02:08, Rivka Miller wrote: > On Oct 25, 2:27 pm, Danny 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 > [snip] To match the literal "$hello$" except at the start of a line, use: (?