Search a string.

I need to find a string which is started from the first of the line and replace it with another string,
s1 = xxyyzz
xxyyzz = ...

s2 = ABCxxyyzzDEF
ABCxxyyzzDEF =...

s3= xxyyzzABCDEF
xxyyzzABCDEF = ...

I need to find just s1.
Although s2 and s3 are including s1, I do not need s2 or s3.
How I can write the code?
string has .find() and .replace() ... just call them?
if you need to replace the same block many times, you can simply loop (using find) or rig up a complex statement.
Last edited on
Topic archived. No new replies allowed.