임에서 항목을F 번호는 F 번호를 배우려고 노력 순서
내가 뭘하고 싶은 것은, 웹 페이지를 다운로드 시퀀스로 분할 한 다음 항목의 인덱스를 찾아서 후 다음 3 개 항목을 가지고있다.
Heres the code - 누군가 제게 잘못하고있는 것을 보여줄 수 있습니까?
let find = "<head>"
let page = downloadUrl("http://www.stackoverflow.com")
let lines = seq ( page.Replace("\r", System.String.Empty).Split([|"\n"|], StringSplitOptions.RemoveEmptyEntries) )
let pos = lines |> Seq.findIndex(fun a -> a == find) // getting a Exception of type 'System.Collections.Generic.KeyNotFoundException' was thrown.
let result = // now to get the next 3 items
printfn "%A" (Seq.toList result);;
고맙게 생각한다 저에게 문제점을 일으키는 원인이 된 점 3 이었다는 것을 생각하십시오 –