I've to face the following challenge which I would like to automatize using a Regular Expression tool:
I have to match this two mappings:
GetSQLParameter("@switch", SqlDbType.TinyInt, 1), _ GetSQLParameter("@IDUtente", SqlDbType.Int), _
sqlClient.AddParameterWithValue("switch", SqlDbType.TinyInt, user.IDUser); sqlClient.AddParameterWithValue("IDUtente", SqlDbType.Int, user.IDUser);
I would like to use 2 capturing group on the first code to get the name of the parameter and it's DB type.
Then I would like to analyze the second piece of code matching the name of the parameter and it's DB Type just to replace it.
Is there a tool for making this kind of matching?
I've asked a strongly related question on Stack Overflow: Which solution to parse a text with Regex and save to a Database the capturing group?