That regex does not preserve the <bindpass> tags and will replace the password in any case, not only when it is "welcome1".
CountZero A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
| [reply] [d/l] |
Fixed the first. The second was intentional. (It's not clear whether he wants "to change the password that is 'welcome1' in the example" or if he wants "to change the password if it is 'welcome1'. I think the former is more likely, but you subscribe to the latter interpretation.)
| [reply] |
| [reply] |