in reply to Re^2: String Manipulation
in thread String replace, another question

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.)

Replies are listed 'Best First'.
Re^4: String Manipulation
by CountZero (Bishop) on Aug 27, 2011 at 09:30 UTC
    Indeed, the OP's specs are not entirely clear. Just like in real life!

    I have seen in a number of applications that "welcome1" is some kind of default password, so he may want to check only these and leave the "real" user passwords alone.

    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