Hello. This is for the wikipedia viewer project. I’m trying to go above and beyond and basically parse the wikipedia article and to display it on my own project. So a user types in a search query, and my code successfully gets back a JSON of the whole wikipedia article, For example, like this wikipedia article on carrots.. So far so good.
But when I try to use regular expressions to highlight just the “taxobox” it highlights the whole article in my codepen, starting from taxobox. When I typed in my regular expression into regex101.com, it works as intended.
The worst thing is that it worked last week, but I somehow broke it and I don’t remember how. Here’s my codepen.
Why does it work in regex101.com, but not on codepen? Please help me understand regular expressions