TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

JavaScript regular expressions

47 点作者 btipling超过 10 年前

2 条评论

chdir超过 10 年前
The short version:<p><a href="http://stackoverflow.com/questions/1520800/why-regexp-with-global-flag-in-javascript-give-wrong-results" rel="nofollow">http:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;1520800&#x2F;why-regexp-with-g...</a>
chrismorgan超过 10 年前
The statefulness of the combination of the g flag and .exec() cost me several hours a couple of months ago on a necessary upgrade, finding something deep inside a router that had been fine with &#x2F;g before but which had after changes made the implicit assumption that .exec() was idempotent. Having it work every second time was a little annoying.
评论 #8191264 未加载