Open cborla opened 2 months ago
After the team daily I came across that I was pointing to the wrong file. New analysis was made:
1) int OSRegex_Compile(const char *pattern, OSRegex *reg, int flags);
Brief: Compile a regular expression to be used later
Usage:
2) const char *OSRegex_Execute(const char *str, OSRegex *reg) __attribute__((nonnull(2)));
Brief: Compares an already compiled OSRegex regular expression with a string
Usage:
3) const char *OSRegex_Execute_ex(const char *str, OSRegex *reg, regex_matching *regex_match) __attribute__((nonnull(2)));
Brief: Compares an already compiled OSRegex regular expression with a string (+ struct for pattern matches)
Usage:
4) void OSRegex_FreePattern(OSRegex *reg);
Brief: Release all the memory created by the compilation/execution phases
Usage:
5) int OS_Regex(const char *pattern, const char *str);
Brief: wrapper around the compile/execute functions. It should only be used when the pattern is only going to be used once.
Usage:
6) int OSMatch_Compile(const char *pattern, OSMatch *reg, int flags);
Brief: Compile a pattern to be used later.
Usage:
7) int OSMatch_Execute(const char *str, size_t str_len, OSMatch *reg);
Brief: Compare an already compiled pattern with a not NULL string.
Usage:
8) void OSMatch_FreePattern(OSMatch *reg);
Brief: Release all the memory created by the compilation/execution phases */
Usage:
9) int OS_Match2(const char *pattern, const char *str) __attribute__((nonnull(2)));
Brief: No Info
Usage:
10)int OS_WordMatch(const char *pattern, const char *str) __attribute__((nonnull));
Brief: Searches for pattern in the string
OS_Match ??
11) char **OS_StrBreak(char match, const char *str, size_t size);
Brief: Split a string into multiples pieces, divided by a char "match".
Usage:
12)size_t OS_StrHowClosedMatch(const char *str1, const char *str2);
Brief: Returns the number of characters that both strings have in similar
13) int OS_StrStartsWith(const char *str, const char *pattern) __attribute__((nonnull));
Brief: Verifies if a string starts with the provided pattern.
14) int OS_StrIsNum(const char *str);
Brief: Checks if a specific string is numeric (like "129544") */
Usage:
15) void OSRegex_free_regex_matching (regex_matching *reg);
Brief: Free memory of regex_matching struct
Usage:
I will move this issue to backlog again because it has no priority.
Parent issue:
Description
Deprecate or remove the non-standard os_regex library and replace it with the standard RE2 library. This will improve compatibility and long-term maintainability of the Inventory module.
Tasks
RE2
.os_regex
is used in the codebase.os_regex
withRE2
.Testing tasks