transform text with given pattern

余生颓废 提交于 2019-12-25 03:14:12

问题


We have 2 versions of a text T before and after,

before:

a\nb\n

after:

b\n

define regex ^[^\n].*\n$ as Line,

define operation delete_line of deleting a substring that match Line from a text,

define operation add_line of adding a substring that match Line from a text,

Obviously, T can transform with operation delete_line.

is there a library that give a general solution of this problem?

Given a set of regex ,it will calculate if the text can transform before to after.

来源:https://stackoverflow.com/questions/54017344/transform-text-with-given-pattern

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!