Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
除了使用正则表达式搜索手动进行之外,还有其他更好的方法来解析 JAD 文件吗?
我需要能够搜索新MIdlet-Install-Notify属性并将其替换/插入到给定的 JAD 文件中,同时更新MIDlet-Jar-URL属性的值。
MIdlet-Install-Notify
MIDlet-Jar-URL
对于我的情况,使用 ANTLR 或 TinyPG 有点矫枉过正。
TIA
即使是正则表达式也可能是矫枉过正,尽管它肯定会完成工作。这是一种非常简单的文本格式解析,string.StartsWith() 和 string.IndexOf() 查找冒号会很好。