I have a string
string="Please have a nice day and sleep well Replace_12123_31233_32134_12342 Good day"
How do i replace "Replace_12123_31233_32134_1234" in the above string.??
Please help.
Regards,
Qwerty
I have a string
string="Please have a nice day and sleep well Replace_12123_31233_32134_12342 Good day"
How do i replace "Replace_12123_31233_32134_1234" in the above string.??
Please help.
Regards,
Qwerty
bash/ksh93:
$ string="Please have a nice day and sleep well Replace_12123_31233_32134_12342 Good day"
$ string=${string//Replace_12123_31233_32134_12342/REPLACED}
$ echo $string
Please have a nice day and sleep well REPLACED Good day
i do not require to replace that with "Replaced". i want to take out that string - "Replace_12123_31233_32134_12342" and do certain operations with it... this might be a different string everytime... but the position of the string wouldnt change..
Didn't you write "How do i replace "Replace_12123_31233_32134_1234" in the above string.??"
earlier?
Please elaborate on this aspect. At what position will "this" string occur in the bigger string? Does "this" string terminate with a space/end-of-bigger-string? or does "this" string have a fixed length?