Find text position

Hi,
There is a question about find text position need help.
I want to find specific text position and modify it. But it would select incorrect text.

For example:
Mainstep_EWMA
Mainstep
Mainstep_0102
Mainstep_0304

I want to modify Mainstep but it selected Mainstep_EWMA to modify.
The order in every file is different so that I cannot use Occurrence to select text.
Could anyone give me some suggestion about this?

system.Text.RegularExpressions.Regex.Replace(txt, "(?m)(Mainstep)[\s]", modifyValue)

where txt =
Mainstep_EWMA
Mainstep
Mainstep_0102
Mainstep_0304

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.