convert.h File Reference

|  | convert.h File Reference updated Thu Jun 19 2025 by Robert van Engelen |

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

Namespaces | Typedefs | Functions | Variables
convert.h File Reference

RE/flex regex converter. More...

`#include <reflex/error.h>`
`#include <string>`
`#include <map>`
`#include <cstring>`
Include dependency graph for convert.h:
This graph shows which files directly or indirectly include this file:

## Namespaces
| reflex
| reflex::convert_flag

## Typedefs
typedef int | reflex::convert_flag_type
| Conversion flags for reflex::convert. More...

## Functions
std::string | reflex::convert (const char *pattern, const char *signature, convert_flag_type flags=convert_flag::none, bool *multiline=NULL, const std::map< std::string, std::string > *macros=NULL)
| Returns the converted regex string given a regex library signature and conversion flags, throws regex_error. More...
std::string | reflex::convert (const std::string &pattern, const char *signature, convert_flag_type flags=convert_flag::none, bool *multiline=NULL, const std::map< std::string, std::string > *macros=NULL)
bool | reflex::supports_modifier (const char *signature, int modchar)
bool | reflex::supports_escape (const char *signature, int escape)

## Variables
const convert_flag_type | reflex::convert_flag::none = 0x0000
| no conversion (default) More...
const convert_flag_type | reflex::convert_flag::basic = 0x0001
| convert basic regex (BRE) to extended regex (ERE) More...
const convert_flag_type | reflex::convert_flag::unicode = 0x0002
| convert . (dot), `\s`, `\w`, `\l`, `\u`, `\S`, `\W`, `\L`, `\U` to Unicode More...
const convert_flag_type | reflex::convert_flag::recap = 0x0004
| remove capturing groups, add capturing groups to the top level More...
const convert_flag_type | reflex::convert_flag::lex = 0x0008
| convert Lex/Flex regular expression syntax More...
const convert_flag_type | reflex::convert_flag::u4 = 0x0010
| convert `\uXXXX` and UTF-16 surrogate pairs More...
const convert_flag_type | reflex::convert_flag::anycase = 0x0020
| convert regex to ignore case, same as `(?i)` More...
const convert_flag_type | reflex::convert_flag::multiline = 0x0040
| regex with multiline anchors `^` and `$`, same as `(?m)` More...
const convert_flag_type | reflex::convert_flag::dotall = 0x0080
| convert `.` (dot) to match all, same as `(?s)` More...
const convert_flag_type | reflex::convert_flag::freespace = 0x0100
| convert regex by removing spacing, same as `(?x)` More...
const convert_flag_type | reflex::convert_flag::notnewline = 0x0200
| inverted character classes and do not match newline `\n` More...
const convert_flag_type | reflex::convert_flag::permissive = 0x0400
| convert Unicode to more compact UTF-8 patterns, permits some invalid UTF-8 sequences More...
const convert_flag_type | reflex::convert_flag::closing = 0x8000
| permit matching ) literally when it has no opening ( More...

## Detailed Description

RE/flex regex converter.

Author
  Robert van Engelen - engel.nosp@m.en@g.nosp@m.enivi.nosp@m.a.co.nosp@m.m

Copyright
  (c) 2016-2025, Robert van Engelen, Genivia Inc. All rights reserved.
  (c) BSD-3 License - see LICENSE.txt