# std::basic_regex<CharT,Traits>::flags

> C++ Atlas: `cppatlas.com/w/cpp/regex/basic_regex/flags` | Source: https://en.cppreference.com/w/cpp/regex/basic_regex/flags | Domain: Regular expressions | Standards: C++11

Returns the regular expression syntax flags as set in the constructor or the last call to assign().

## Official Specification Summary (cppreference)

```cpp
flag_type flags() const; // (since C++11)
```

Returns the regular expression syntax flags as set in the constructor or the last call to `assign()`.

### Parameters

(none)

### Return value

Current regular expression syntax flags.

### Exceptions

May throw implementation-defined exceptions.

### Example

> Note: This section is incomplete Reason: no example

---
Attribution: content from https://en.cppreference.com/w/cpp/regex/basic_regex/flags (cppreference.com), licensed under CC-BY-SA 3.0 and GFDL. Modified: converted to markdown, study notes added. Offline snapshot of 9 February 2025.