如何在python中打开多个doc文件并从中解析电子邮件ID并在csv中写入?

时间:2018-01-09 05:46:19

标签: python dataframe

我想从1000个word文档文件中提取电子邮件ID,并在python中生成一个csv文件。

1 个答案:

答案 0 :(得分:0)

如果您的问题是检测到电子邮件地址,则此abstract class BaseEntity { static getById(id: number): BaseEntity {...} } abstract class BaseObject extends BaseEntity { static getBySlug(slug: string): BaseObject {...} } class User extends BaseObject {} class Post extends BaseObject {} class Interactor { doSomething(obj: new () => BaseObject) { // Since you want to call both method, let's assume "BaseObject" is more fitting // Since you are in a static context, you have no access to "obj" in the static method as long as you don't pass it (maybe a non-static function would be better?) BaseEntity.getById(3) // no error BaseObject.getBySlug('foo') // no error } main() { this.doSomething(User) // no error this.doSomething(Post) // no error } } 代码将为您提供帮助:

Regex

,您应该像这样在python中使用它:

[\w\.-]+@[\w\.-]

以及用于读取或写入csv的其他部分,您可以使用此link