我想使用正则表达式和python
进行捕获Date List-of-Admins-Meeting
Duration List-of-Admins-Meeting
VideoLink List-of-Admins-Meeting
Date List-Of-Admins-
Duration List-Of-Admins-
VideoLink List-Of-Admins-
所需输入:
list=["Date List-of-Admins-Meeting Duration List-of-Admins-Meeting VideoLink List-of-Admins-Meeting Date List-Of-Admins- Duration List-Of-Admins- VideoLink List-Of-Admins-"]
所需的输出:
List_of_Dates=["Date List-of-Admins-Meeting","Date List-Of-Admins-"]
List_of_Duration=["Duration List-of-Admins-Meeting","Duration List-Of-Admins-"]
List_of_VideoLink=["VideoLink List-of-Admins-Meeting","VideoLink List-Of-Admins-"]
我想用日期,持续时间和VideoLink捕获所有标签,但是标题名称会发生变化,如上面所示。
任何帮助将不胜感激
这是我到目前为止的代码
regex = re.compile('\s([List])\w+\-([f])')