V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
stephenliubp
V2EX  ›  算法

算法正则匹配

  •  
  •   stephenliubp · Dec 11, 2019 · 2674 views
    This topic created in 2334 days ago, the information mentioned may be changed or developed.

    问题描述:

    1. 一个 yml 文件,里面有 n 个字符串
    2. 有个项目工程,里面 m 个源代码文件

    需求是从这个 m 个源代码文件里面找出那 n 个字符串中的任意一个或多个,也就是找出代码文件中存在于 n 个字符串中的一个或者多个。

    怎么样实现比较好? KMP 还是正则?

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1283 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 16:59 · PVG 00:59 · LAX 09:59 · JFK 12:59
    ♥ Do have faith in what you're doing.