在.net环境里怎么正则匹配如下的一堆内容里的英文姓名,从sara开始到honberg结束,求大师!State Health Care Financing Strategies for Children with Intellectual and Developmental DisabilitiesSara S Bachman,Margaret Comeau,Carol

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/15 10:52:01

在.net环境里怎么正则匹配如下的一堆内容里的英文姓名,从sara开始到honberg结束,求大师!State Health Care Financing Strategies for Children with Intellectual and Developmental DisabilitiesSara S Bachman,Margaret Comeau,Carol
在.net环境里怎么正则匹配如下的一堆内容里的英文姓名,从sara开始到honberg结束,求大师!

State Health Care Financing Strategies for Children with Intellectual and Developmental Disabilities
Sara S Bachman,Margaret Comeau,Carol Tobias,Deborah Allen,Susan Epstein,Kathryn Jantz and Lynda Honberg
Abstract
| Full Text
| PDF (96 KB)

在.net环境里怎么正则匹配如下的一堆内容里的英文姓名,从sara开始到honberg结束,求大师!State Health Care Financing Strategies for Children with Intellectual and Developmental DisabilitiesSara S Bachman,Margaret Comeau,Carol
按照你的要求要分两步能实现,首先取出包含名字的字符串,用每一个正则表达式,之后再进行匹配,采用第二个正则表达式.
第一个:
@"

[\S\s]*
"
匹配结果:
Sara S Bachman, Margaret Comeau, Carol Tobias, Deborah Allen, Susan Epstein, Kathryn Jantz and Lynda Honberg

第二个:
@"(?\b[A-Z][a-z]+ [A-Z][a-z]+\b)"
匹配结果:
Margaret Comeau
Carol Tobias
Deborah Allen
Susan Epstein
Kathryn Jantz
Lynda Honberg