[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Anchoring a RE in a string
From: |
Doug Lewan |
Subject: |
Anchoring a RE in a string |
Date: |
Fri, 8 Jun 2012 18:48:52 +0000 |
Currently I'm trying to check the /beginning/ of a multi-line string with a
regular expression.
The scenario looks like this:
(string-match "^\\s-+ABCD"
"qwer\n zxcv\n ABCD")
^ Matches here.
I want it to fail because the beginning doesn't match.
I hadn't expected the anchor (^) to match inside the string.
I can't be the only one to have wanted to do this.
What's the right way.
Thanks.
,Douglas
Douglas Lewan
Shubert Ticketing
(201) 489-8600 ext 224
- Anchoring a RE in a string,
Doug Lewan <=
- RE: Anchoring a RE in a string, Doug Lewan, 2012/06/08
- Message not available
- Re: Anchoring a RE in a string, jpkotta, 2012/06/08
- RE: Anchoring a RE in a string, Doug Lewan, 2012/06/08
- Re: Anchoring a RE in a string, Philipp Haselwarter, 2012/06/09
- Message not available
- Re: Anchoring a RE in a string, rusi, 2012/06/10
- Re: Anchoring a RE in a string, Philipp Haselwarter, 2012/06/10
- RE: Anchoring a RE in a string, Drew Adams, 2012/06/10