Hello!I need to use a search in a line using regular extersion in the code. Tell me, is there a library for such purposes that will work in Keil and compile without errors?
I tried to introduce a library regex.h from Glibc, but I didn't succeed.
The Keil MDK does not contain a library that can search in a string with regular expressions. However, if you have standard C/C++ source code which handles regex searches, you can compile it with the C/C++ Arm compiler, which is part of the Keil MDK. The Arm Compiler version 6 supports even newer C and C++ standards.
I use the regex library presented at https://github.com/garyhouston/regexp.old on my embedded projects. It does use malloc though. If that is unacceptable, you could replace the (one only) malloc call with some local memory provider, I have done this also.
To clarify, I use just
regerror.c, regsub.c, regexp.c and the two .h files that they reference.
You can of course use malloc in your microcontroller project. This function exists and you can configure the heap size in the startup code.