AlphaSynth.Platform.Platform.ScriptFileFromStack C# (CSharp) Method

ScriptFileFromStack() private static method

private static ScriptFileFromStack ( JsString stack ) : string
stack JsString
return string
        private static string ScriptFileFromStack(JsString stack)
        {
            var matches = stack.match(@"(data:text\/javascript(?:;[^,]+)?,.+?|(?:|blob:)(?:http[s]?|file):\/\/[\/]?.+?\/[^:\)]*?)(?::\d+)(?::\d+)?");
            if (!matches.As<bool>())
            {
                matches = stack.match(@"^(?:|[^:@]*@|.+\)@(?=data:text\/javascript|blob|http[s]?|file)|.+?\s+(?: at |@)(?:[^:\(]+ )*[\(]?)(data:text\/javascript(?:;[^,]+)?,.+?|(?:|blob:)(?:http[s]?|file):\/\/[\/]?.+?\/[^:\)]*?)(?::\d+)(?::\d+)?");
                if (!matches.As<bool>())
                {
                    matches = stack.match(@"\)@(data:text\/javascript(?:;[^,]+)?,.+?|(?:|blob:)(?:http[s]?|file):\/\/[\/]?.+?\/[^:\)]*?)(?::\d+)(?::\d+)?");
                    if (!matches.As<bool>())
                    {
                        return null;
                    }
                }
            }
            return matches[1];
        }