Hi,
(?<= )
is lookbehind in regex. For example, (?<=A)B
means B will be matched if there is A before B.
(?= )
is lookahead in regex. For example, A(?=B)
means A will be matched if there is B after A.
System.Text.RegularExpressions.Regex.Match(strContent,"(?<=^(.*\n){3})[\s\S]*").Value
(?<=^(.*\n){3})[\s\S]*")
means [\s\S]* will be matched before ^(.*\n){3}
.
[\s\S]*
means all characters will be matched, and ^(.*\n){3}
means first 3 lines will be matched.
As a result, it returns all the characters after 3rd line.
System.Text.RegularExpressions.Regex.Replace(strContent,"(?<=,"").+?(?="",)",function(m) m.Value.Replace(",",""))
(?<=,"").+?(?="",)
will match characters between ,"
and ",
and function(m) means anonymous function. In this case it replaces β,β to ββ for matched strings.
As a result it can remove double quote and comma if input is like βxxx,xx,xβ for example.
Regards,