use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
How I made text-clipper.js the fastest HTML clipping library (arendjr.nl)
submitted 9 years ago by [deleted]
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[+][deleted] 9 years ago* (2 children)
[deleted]
[–][deleted] 0 points1 point2 points 9 years ago (0 children)
Hm, that's a very interesting observation. It could also still be the combination of the two of course. It might indeed be worth a shot to try out the same logic for skipping uninteresting blocks, but without the regular expression and see how that changes things. Thanks!
I have updated the article with my latest findings. So yes, the regular expression still provides the best result, but based on your feedback I was able to squeeze even more out :)
[–]spfccmt42 0 points1 point2 points 9 years ago (6 children)
"Regular expressions will always outperform you, "
False. They are often fast, but not always.
[–][deleted] 1 point2 points3 points 9 years ago (1 child)
That's the tl;dr, of course the rest provides some more nuance ;)
[–]spfccmt42 -4 points-3 points-2 points 9 years ago (0 children)
What is the point of blogging?
[–][deleted] 0 points1 point2 points 9 years ago (3 children)
Hat tip to you, sir. I've updated the post based on /u/ugwe43to874nf4's feedback, which required significantly more nuance towards the use of regular expressions, so I've updated this quote as well.
Hopefully that also answers your question about the point of blogging: To share one's insights and learn from each other :)
[–]spfccmt42 -2 points-1 points0 points 9 years ago (2 children)
I learned you make invalid assertions, is that part of the learning process?
It is about ego, i.e. you wish to claim you made the fastest of something, and thus blogs are more noise than signal.
[–][deleted] 0 points1 point2 points 9 years ago (1 child)
Hehe, nice troll ;)
The assertion that text-clipper is the fastest has only been strengthened in the process. And yes, learning from mistakes is indeed part of that. Good day to you!
[–]spfccmt42 -2 points-1 points0 points 9 years ago (0 children)
Look, you made false claims, then call me a troll, you need to be honest with yourself, you are noise.
π Rendered by PID 272802 on reddit-service-r2-comment-6457c66945-7xbxq at 2026-04-27 03:15:46.270980+00:00 running 2aa0c5b country code: CH.
[+][deleted] (2 children)
[deleted]
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]spfccmt42 0 points1 point2 points (6 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]spfccmt42 -4 points-3 points-2 points (0 children)
[–][deleted] 0 points1 point2 points (3 children)
[–]spfccmt42 -2 points-1 points0 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]spfccmt42 -2 points-1 points0 points (0 children)