regexp subgroup 추출하기 > IT 기술백서

IT 기술백서

직접 알아내거나 검색하기 귀찮아서 모아 둔 것

Go lang | regexp subgroup 추출하기

본문

FindStringSubmatch() 를 사용하면 []string 형태로 리턴한다.

 

[code]

r := regexp.MustCompile("(?is)[^\"]+\"([^\"]+)")

return r.FindStringSubmatch(string(data))[1]

[/code]

댓글 0개

등록된 댓글이 없습니다.

Menu