I have lines as below
M10 end
start M11
M1
M1 start
M n1
end M1
What I'm trying to achieve is to get a result that has only " M1 " with regex.
This is my current code.
Regex r = new Regex("^M1$|M1$");
The result looks lower, where the line "Start M1" is missing
M1
end M1
source
share