Skip to content

Instantly share code, notes, and snippets.

@abenevaut
Last active March 9, 2024 23:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abenevaut/7597297 to your computer and use it in GitHub Desktop.
Save abenevaut/7597297 to your computer and use it in GitHub Desktop.
QString text("Text example {remplacement_1} & {element_2} {element_2} !!");
QRegExp rx ("\\{remplacement_1\\}");
QRegExp rx2 ("\\{element_2\\}");
text.replace(rx, "REPLACEMENT 1");
text.replace(rx2, "REPLACEMENT 2");
std::cout << text.toStdString();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment