Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regex Pattern to insert SWRI_PROFILE at begin of method #20

Open
Magnusgaertner opened this issue Nov 3, 2018 · 0 comments
Open

Regex Pattern to insert SWRI_PROFILE at begin of method #20

Magnusgaertner opened this issue Nov 3, 2018 · 0 comments

Comments

@Magnusgaertner
Copy link

Description:
find almost any c++ method and add swri_profile() to method start if there is not already some swri code at the start.

Find pattern:
(([a-zA-Z_][a-zA-Z0-9_]*)([\n\r\s]+)([a-zA-Z_][a-zA-Z0-9_]*)::([a-zA-Z_][a-zA-Z0-9_]*)\(([^\)]*)\)([\n\r\s]*)(const)?([\n\r\s]*)\{)(([\n\r\s]*))([^\s])(?!WRI)

Replace pattern:
$1SWRI_PROFILE("$5");$10$12

:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant