I'm trying to find a solution that I can match strings inside a certain surrounding pattern using regex in c++ 11 I need several operations for this:
- Replace the text with asterisks (like passwords). For example, Original text: This is my password: ***Password 1 2 3***. Result: This is my password: ****.
- Remove the surroundings and display as clear text: For example, Original text: This is my password: ***Password 1 2 3***. Result: This is my password: Password 1 2 3.
- Get the text if it has multiple occurrences. For example, Original text: This is user: ***User1@gmail.com*** password: ***Password 1 2 3***. Result: This is user: User1@gmail.com password: Password 1 2 3.
Thanks
Aucun commentaire:
Enregistrer un commentaire