I'm making a few assumptions, but it appears you want to find all lines that contain
MeshFile=<someValue>.gmt
then update the parameters for CollTarget and HATTarget to TRUE, without touching any of the other parameters that may be on that line.
Assuming that CollTarget and HATTarget are always the first two parameters, and in that same order, you can run a Replace All command (CTRL+H) on your file and user the following:
Find what = (.*)(wall.gmt) CollTarget=(\w+) HATTarget=(\w+)(.*) Replace with = $1$2 CollTarget=True HATTarget=True$5
Explanation:
- See the Notepad++ Regex documentation for general syntax (http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=Regular_Expressions)
- Any value found by the pattern within parenthesis will be available in the "$N" syntax. The number cooresponds to the parenthesis pair count in the find expression.
- Change the value in the second parenthesis pair to change the instance name that you want to do a replace/update for. In my example I used wall.gmt
- The replacement expression can be translated to:
- Insert anything found at the beginning of the line before the instance name - the stuff found by "(.*)"
- Insert the instance name that was searched for (so you don't have to type it in the search and replace expression)
- Give the new values to CollTarget and HATTarget
- Append anything that was found after HATTarget
If my assumption that CollTarget and HATTarget are not always the first or in the same order, then you will need to modify the search expression into two separate search and replace calls where the first searches for only CollTarget and updates that parameter's value, then a second one to look for HATTarget and update it.