In 2019, the best embedded cryptography C library is probably BearSSL. Beside it being IMO quite secure (it gives a lot of consideration to side-channel attacks), it is very compact and it is designed so as not to dynamically allocate any memory (e.g. it does not call malloc).
You could use the http://www.pcre.org/ library.
Please cut our problem into smaller pieces the next time.
If you current issue is a regex question, then it is unneeded information that you fetch this data with wget.
It is easier to focus on your issues if only the relevant information is in the question.