TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Tools for working with Vim regex?

1 pointsby Curiositryabout 2 years ago
I have been trying to convert fairly complex-for-me PCRE&#x2F;JavaScript style regular expressions[1] to be Vim-compatible.<p>I have not been able to find any tool that will automatically convert to and from Vim regex. Is there one I have missed?<p>In addition, the main Regex testing apps I use (regexr.com and regex101.com) don&#x27;t support Vim regex, which makes figuring out what&#x27;s wrong more tedious.<p>The closest I have gotten is by asking Phind to do it (https:&#x2F;&#x2F;www.phind.com&#x2F;search?cache=43967e8e-ec1c-4e9a-94ab-5049857e330f), but it does not produce a working result on its own.<p>The only real resource I&#x27;ve found is https:&#x2F;&#x2F;vimregex.com&#x2F;.<p>Is there any automated tool that could help with this task?<p>Thanks!<p>[1]: This common-OCR-error-correcting regex is one of them: (?&lt;!\b[A-Z][a-z]{3}|th|whil|i)(?:e|s)((?:\s|(?:\n){2})(?:&quot;|*)?[A-Z]) (Edit: HN is removing some of the escape characters. See: https:&#x2F;&#x2F;gist.githubusercontent.com&#x2F;curiositry&#x2F;dad4379d7c6de3e5969e367f0a69aa4e&#x2F;raw&#x2F;49521de5694c3e839a63ca482574e0654c909ec6&#x2F;regex.txt)

1 comment

gregjorabout 2 years ago
<a href="https:&#x2F;&#x2F;chrisarcand.com&#x2F;perl-compatible-regular-expressions-in-vim&#x2F;" rel="nofollow">https:&#x2F;&#x2F;chrisarcand.com&#x2F;perl-compatible-regular-expressions-...</a><p><a href="https:&#x2F;&#x2F;vim.fandom.com&#x2F;wiki&#x2F;Perl_compatible_regular_expressions" rel="nofollow">https:&#x2F;&#x2F;vim.fandom.com&#x2F;wiki&#x2F;Perl_compatible_regular_expressi...</a>
评论 #35577024 未加载
评论 #35576957 未加载