🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.indesign.featurerequests
Article #12

Re: Grep Styles/Nested Styles from the end of the paragraph

#12
From: jongware
Date: Sun, 08 Feb 2009 23:18
15 lines
1134 bytes
Indeed, Dave. A tiny improvement on your nigh-on perfect answer would be that

      \w




matches any word character -- you don't have to 'negate' space. A simple

      \w\s+\w+\s*$




does the trick. You only have to specify one single character of the 2nd to last word, although a side effect is that this word might be broken (but if that bothers you, use '\w+' instead). The final '\s*' is to ignore zero-or-more space characters at the end of the paragraph, as there always seems to be.
Technical Details
Message-ID: <59b7d221.1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newshub.sdsu.edu!webcrossing
References: <59b7d221.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1efe7f,dcad88564d6811f7
X-Google-Attributes: gid1efe7f,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: jongware@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.indesign.featurerequests
Subject: Re: Grep Styles/Nested Styles from the end of the paragraph
Message-ID: <59b7d221.1@webcrossing.la2eafNXanI>
Date: Sun, 8 Feb 2009 15:18:18 -0800
References: <59b7d221.-1@webcrossing.la2eafNXanI>
Lines: 17
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit