Identifying Address Patterns in Regular Expressions Regular expressions (RegEx) are commonly used to extract structured data from text. When searching for addresses, a pattern must account for elements such as street numbers, street names, city names, state abbreviations, and ZIP codes. Which of the following RegEx patterns would yield the best results if you want to identify U.S. addresses?多项选择题

A

^\d+\s[A-Za-z\s]+,\s[A-Za-z\s]+,\s[A-Z]{2}\s\d{5}(-\d{4})?$

B

^[A-Za-z0-9_.+-]+@[A-Za-z0-9-]+\.[A-Za-z]{2,5}$

C

^\(\d{3}\)\s\d{3}-\d{4}$

D

^@[A-Za-z0-9_]+$

E

^\d{4,5}$

登录即可查看完整答案

我们收录了全球超50000道真实原题与详细解析,现在登录,立即获得答案。

更多留学生实用工具

加入我们,立即解锁 海量真题独家解析,让复习快人一步!