Q:

How does this Regex function?

output = System.Text.RegularExpressions.Regex.Replace(output, "(?s).*kucing(.*?)</tr>", "$1") + "</tr>"

I  think the purpose is to do some greedy search.
So if we have bla bla bla kucing bla bla bla kucing bla bla bla kucing hello world
It should match hello world. However, I forget how I set that up.
I tried a bunch of regular expression
?System.Text.RegularExpressions.Regex.Replace("Hello World kucing Hi Kitty Kucing I like cat", "(?s)(.*)kucing(.*)", "$2")
" Hi Kitty Kucing I like cat"
    ?System.Text.RegularExpressions.Regex.Replace("Hello World kucing Hi Kitty Kucing I like cat", "(?s).*kucing(.*)", "$1")
" Hi Kitty Kucing I like cat"
    ?System.Text.RegularExpressions.Regex.Replace("Hello World kucing Hi Kitty Kucing I like cat", "(?s)(.*)kucing(.*)", "$1")
"Hello World "
    ?System.Text.RegularExpressions.Regex.Replace("Hello World kucing Hi Kitty Kucing I like cat", "(?s)(.*)kucing(.*)", "$2")
" Hi Kitty Kucing I like cat"

What I want is "I like cat". Basically I want the first .* to be greedy and match "Hello World kucing Hi Kitty Kucing". I want it to go the last "Kucing". Then I want to remove that part and grab the rest. 
How would I do that?

A:

(?s) switch from multiline (default) to singleline
Also your code don't return expect result because you use kucing instead of Kucing, when c# regex is case sensitive.
You can use like this:
string str = "Hello World kucing Hi Kitty Kucing I like cat";

string s = Regex.Replace(str, "(.*)kucing(.*)", "$2",
    RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.Compiled);

string s2 = Regex.Replace(str, "(.*)kucing\\s*(.*)", "$2",
    RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.Compiled);

Console.WriteLine(s);
Console.WriteLine(s2);

\s mean white space.
Output:
 I like cat
I like cat

