From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xah Newsgroups: gmane.emacs.help Subject: Re: Regex Problem Date: Sun, 20 Jul 2008 00:48:36 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1216543547 7408 80.91.229.12 (20 Jul 2008 08:45:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 20 Jul 2008 08:45:47 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jul 20 10:46:34 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KKUYs-0006Ur-Aq for geh-help-gnu-emacs@m.gmane.org; Sun, 20 Jul 2008 10:46:34 +0200 Original-Received: from localhost ([127.0.0.1]:54316 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KKUXy-0004S4-Sp for geh-help-gnu-emacs@m.gmane.org; Sun, 20 Jul 2008 04:45:38 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!w39g2000prb.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 36 Original-NNTP-Posting-Host: 24.6.97.120 Original-X-Trace: posting.google.com 1216540116 19731 127.0.0.1 (20 Jul 2008 07:48:36 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Sun, 20 Jul 2008 07:48:36 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: w39g2000prb.googlegroups.com; posting-host=24.6.97.120; posting-account=bRPKjQoAAACxZsR8_VPXCX27T2YcsyMA User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.22, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:160398 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:55746 Archived-At: On Jul 19, 10:50 am, travis jeffery wrote: > I'm trying to write and extension for using tumbr. In tumblr there are tw= o > requirements for a post; title and body. > > So I set up a tumblr post document as: > title: > body: > > So get the title I use (string-match "\\title: \(.*\)\$"), which is fine > because it's on a single line. But with I'm having trouble getting the bo= dy > because it's multiple lines. So is there someway I can get any text > following the body:_space_? I was thinking also of saving the entire buff= er > and then subtracting the title: TITLE and body:_space_ but I still don't > know about that. > > Thanks for your help. to get text out of the =E2=80=9Cbody:=E2=80=9D, you can do something like t= his: (goto-char 1) (search-forward "body:") (setq mytext (buffer-substring-no-properties (point) (1+ (buffer- size)))) for some basic elisp functions, see http://xahlee.org/emacs/elisp_common_functions.html Xah =E2=88=91 http://xahlee.org/ =E2=98=84