Just adding to Chris’ point, the regex setting you probably need are:
Search string = (.+)>ITT</APP_ID><ROLE>.*?</ROLE>(.+)
Replace string = $1>ITT</APP_ID><ROLE>%Var1%</ROLE>$2
(You need to check 'Perform Variable Substitution')
The important things about the regexs are the two backreferences ($1 and $2) and the “minimal greediness” setting for the .* pattern (“.*?”). For more on Regular expression pattern greediness, have a look at [url]Perl Documentation - Perldoc Browser (search for “greedy”)
As the previous posters mention, regexs are not the best choice (though this one should be safe if document is XML). If possible, convert the string to a record structure, manipulate the record, then convert it back to string.
#webMethods#Integration-Server-and-ESB#Flow-and-Java-services