This works, thanks! I don't understand the syntax, but it works. Much appreciated.
On Wednesday, December 18, 2024 at 2:58:41 PM UTC-8 Rick Gordon wrote: > What about: > > <a href="/posts/[^>]+/index\.html"> > > Rick Gordon > ------------------------------ > From: Greg Raven <[email protected]> > To: BBEdit Talk <[email protected]> > Date: Wed, Dec 18, 2024 10:03:23AM -0700 > Subject: Grep non-greedy finding is not working for me in this instance > > I use Grep in BBEdit a lot for cleaning up websites, but now there's a > situation where I'm missing something. > > I'm redoing a site from WordPress to static, so there are a bunch of links > that look like: > > <a href="/posts/post-name/index.html">Post name</a> > > I need to change these so the link looks like: > > <a href="/posts/post-name.html">Post name</a> > > This seems as though it should be simple to find these instances with: > > <a href="/posts/.+?/index\.html"> > > But if a paragraph contains: > > <a href="/posts/post-name/index.html">Post name</a>. <a > href="/search/index.html">Search here.</a> > > It glumps both links (and anything / everything in between) into one found > result. > > I sorta got it to work with this: > > <a href="/posts/[a-z].+?[a-z]/index\.html"> > > But there has to be a more straightforward way. What am I missing? > > -- > This is the BBEdit Talk public discussion group. If you have a feature > request or believe that the application isn't working correctly, please > email "[email protected]" rather than posting here. Follow @bbedit on > Mastodon: <https://mastodon.social/@bbedit> > - > > _______________________________________ > RICK GORDON > _______________________________________ > EMAIL: [email protected] > WWW: www.shelterpub.com > ------------------------------ > -- This is the BBEdit Talk public discussion group. If you have a feature request or believe that the application isn't working correctly, please email "[email protected]" rather than posting here. Follow @bbedit on Mastodon: <https://mastodon.social/@bbedit> --- You received this message because you are subscribed to the Google Groups "BBEdit Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/bbedit/0c965ddc-0a84-46b7-8fb1-d919c267c045n%40googlegroups.com.
