Skip to content

Commit

Permalink
Updates to REAMDE.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Bill-hbrhbr committed Jul 19, 2024
1 parent e4dfa7e commit ca648cc
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions components/core/src/clp/regex_utils/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ metacharacters above, CLP should use the wildcard version.

### Includes

* The translator function returns a `Result<T,E>` type, which can either contain a value or an error
code.
* The translator function returns a `Result<std::string, std::error_code>` type, which can either
contain a value or an error code.

To use the translator:

Expand All @@ -46,7 +46,7 @@ if (result.has_error()) {
```cpp
#include <regex_utils/RegexToWildcardTranslatorConfig.hpp>

RegexToWildcardTranslatorConfig config{true, false, //...other booleans};
RegexToWildcardTranslatorConfig config{true, false, /*...other booleans*/};
auto result = regex_to_wildcard(wildcard_str, config);

// Same as above
Expand All @@ -65,6 +65,12 @@ For a detailed description on the options order and usage, see the
### Custom configuration
The `RegexToWildcardTranslatorConfig` class objects are currently immutable once instantiated. The
constructor takes the following arguments in order:
* `case_insensitive_wildcard`: to be added later along with the character set translation
implementation.
* `add_prefix_suffix_wildcards`: in the absence of regex anchors, add prefix or suffix wildcards so
the query becomes a substring query.
- E.g. `info.*system` gets translated into `*info*system*` which makes the original query a
Expand Down

0 comments on commit ca648cc

Please sign in to comment.