package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`(?m)(department(s)? of |in\n)(\w+ ?\w+[^,]?\w+[^,]?\w+[ ]?\w+[ ]?\w+)`)
var str = `Virginia Tech Sample:
A COMPARISON OF THE EFFICIENCY AND EFFECTIVENESS
OF TWO MODELS FOR DETERMINING THE COST
OF SPECIAL EDUCATION PROGRAMS
by
Kenneth L. Kienas
Dissertation submitted to the Faculty of the
Virginia Polytechnic Institute and State University
in partial fulfillment of the requirements for the degree of
DOCTOR OF EDUCATION
in
Administration and Supervision of Special Education
APPRQVED:
Richard G. Salmon, Co-Chairman Phili R. Jones, Co-Chairman
John A. McLaughlin Shirley A Jones
Shirley A. Underwood
May, 1986
Blacksburg, Virginia
--------------------------------------------------------
MIT Sample:
THE RESPONSE OF CONTINUOUS SYSTEMS
TO RANDOM NOISE FIELDS
by
Richard H. Lyon
A. B., Evansville College, 1952
Submitted in Partial Fulfillment of the
Requirements for the Degree of
Doctor of Philosophy
at the
MASSACHUSETTS INSTITUTE OF TECHNOLOGY
June, 1955
Signature of Author
department of Physics, May 16, 1955
Certified by
Thesis Supervisor
Accepted by
Chairman, Departmental Committee on Graduate, Students
---------------------------------------------------------
MIT Sample:
ON THE MECHANICS OF TWIST INSERTION
by
ALY H, M, EL-SHIEKH
B.Sc. University of Alexandria, U.A.R.
1956
S.M. Massachusetts Institute of Technology
1961
M.E. Massachusetts Institute of Technology
1964
Submitted in Partial Fulfillment
of the Requirements for the
Degree of Doctor of Science
at the
MASSACHUSETTS INSTITUTE OF TECHNOLOGY
May 1965
Signature of the Author
department of Mechanical Engineering
Fibers and Polymers Division
Certified by
Thesis Supervisor
Accepted by
Chairman Departmental Committee on Graduate Students
------------------------------------------------------------
MIT Sample:
HYDRAULIC DAMPER DESIGN
FOR A KNEE PROSTHESIS
by
Eric Hershler Bott
Submitted in Partial Fulfillment
of the Requirements for the
Degree of Bachelor of Science
at the
MASSACHUSETTS INSTITUTE OF TECHNOLOGY
February, 1975
Signature of Author
departments of Mechanical Engineering and
Physics, February 23, 1975
Certified by
Thesis Supervisor
Accepted by
Chairman, Departmental Committee on Theses
MAR 15 1976
LIBRARIES
------------------------------------------------------------
Virginia Tech Sample:
ASSESSMENT OF A MENTOR PROGRAM
ON SELF-CONCEPT AND ACHIEVEMENT VARIABLES
OF MIDDLE SCHOOL UNDERACHIEVERS
by
Helene Aiello
Dissertation submitted to the faculty of the Virginia
Polytechnic Institute and State University in partial
fulfillment of the requirements for the degree of
Doctor of Education
in
Administration and Supervision
Of
Special Education
APPROVED:
Philip R. Jones, Chairman Kenneth Underwood
Sylvia Auton
Shirley Jones Ronald McKeen
February 22, 1988
Blacksburg, Virginia`
for i, match := range re.FindAllString(str, -1) {
fmt.Println(match, "found at index", i)
}
}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Golang, please visit: https://golang.org/pkg/regexp/