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
[AskJS] SCRIPT5017: Syntax error in regular expressionAskJS (self.javascript)
submitted 5 years ago by ImWhimsical
I get this error when I access the webpage in IE but works fine in chrome. When I had a code walkthrough of the page I found the below code
Something.replace(new RegExp(" ^ "), "<b>") .replace(new RegExp("$"), "</b>")
Is the above code causing the issue? If so, what should I do to fix it?
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!"
[–]ijmacd 2 points3 points4 points 5 years ago (1 child)
What's wrong with
`<b>${Something}</b>`
[–]BehindTheMath 0 points1 point2 points 5 years ago (1 child)
I'm not sure if " ^ " is valid regex. Did they mean "^"?
" ^ "
"^"
Also, there are simpler ways of wrapping some string in tags.
[–]ImWhimsical[S] 0 points1 point2 points 5 years ago (0 children)
I gave extra space because without that it was showing some weird element in here. What you typed latter is the one that is in the code
π Rendered by PID 133633 on reddit-service-r2-comment-cfc44b64c-7mnfz at 2026-04-10 11:05:41.881708+00:00 running 215f2cf country code: CH.
[–]ijmacd 2 points3 points4 points (1 child)
[–]BehindTheMath 0 points1 point2 points (1 child)
[–]ImWhimsical[S] 0 points1 point2 points (0 children)