Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 253753

Regular expressions are a declarative language, mainly used for pattern matching within strings. Please include a tag specifying the programming language you are using, together with this tag.

1 vote
1 answer
1k views

Replace Multiple Matches with different Values

I want to replace multiple matches of a Regex with different values from a map. I have for example the following string #id#_#date#_#value#_additional_text. … "9"}, {"id", "1234"}, {"date", "1234"}, {"more", "abc"}}; std::vector<std::string> patterns{}; std::string input_data = "#id#_#date#_#value#_additional_text"; std::regex
Kevin's user avatar
  • 87