[re.regex.swap] # 28 Text processing library [[text]](./#text) ## 28.6 Regular expressions library [[re]](re#regex.swap) ### 28.6.7 Class template basic_regex [[re.regex]](re.regex#swap) #### 28.6.7.6 Swap [re.regex.swap] [🔗](#lib:swap,basic_regex_) `void swap(basic_regex& e); ` [1](#1) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L10803) *Effects*: Swaps the contents of the two regular expressions[.](#1.sentence-1) [2](#2) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L10807) *Postconditions*: *this contains the regular expression that was in e, e contains the regular expression that was in *this[.](#2.sentence-1) [3](#3) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L10813) *Complexity*: Constant time[.](#3.sentence-1)