我正在尝试从文本文件中提取文本,但要收集的文本长度不同。这是我第一次尝试使用 RegEx 并且可以使用一些建议
这是源文本。我正在尝试仅提取.解析姓名、电子邮件、出生日期和电话号码。任何帮助,将不胜感激。
Basic data
</td><td align="left" width="10" style="padding:0; margin:0;"> </td><td align="left" width="290" style="padding:0;"> </td></tr><tr><td align="right" width="250" style="padding-bottom:8px; margin:0; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size:14px;">
Name:
</td><td align="left" width="10" style="padding:0; margin:0;"> </td><td align="left" width="290" style="color: #262626; padding-bottom:8px ; font-family: Arial, Helvetica, sans-serif; font-size:14px;">Test User3</td></tr><tr><td align="right" width="250" style="padding-bottom:8px; margin:0; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size:14px;">
Email:
</td><td align="left" width="10" style="padding:0; margin:0;"> </td><td align="left" width="290" style="color: #262626; padding-bottom:8px ; font-family: Arial, Helvetica, sans-serif; font-size:14px;"><span style="color: #262626; text-decoration:none;">testuser3@busystreet.com</span></td></tr><tr><td align="center" colspan="3" height="20" width="100%" style="color: #262626; padding:0; margin:0; line-height:20px;"> </td></tr><tr><td align="right" width="250" style="padding-bottom:8px; margin:0; color: #002a5c; font-family: Arial, Helvetica, sans-serif; font-size:14px;">
Custom data
</td><td align="left" width="10" style="padding:0; margin:0;"> </td><td align="left" width="290" style="padding:0;"> </td></tr><tr><td align="right" width="250" style="padding-bottom:8px; margin:0; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size:14px;">ref:
</td><td align="left" width="10" style="padding:0; margin:0;"> </td><td align="left" width="290" style="color: #262626; padding-bottom:8px ; font-family: Arial, Helvetica, sans-serif; font-size:14px;">06/16/1963</td></tr><tr><td align="right" width="250" style="padding-bottom:8px; margin:0; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size:14px;">cellphone:
</td><td align="left" width="10" style="padding:0; margin:0;"> </td><td align="left" width="290" style="color: #262626; padding-bottom:8px ; font-family: Arial, Helvetica, sans-serif; font-size:14px;">6152498588</td></tr><tr><td align="center" colspan="3" height="20" width="100%" style="color: #262626; padding:0; margin:0; line-height:20px;"> </td></tr><tr><td align="right" width="250" style="padding-bottom:8px; margin:0; color: #002a5c; font-family: Arial, Helvetica, sans-serif; font-size:14px;">
提前感谢,
道格