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.
我有一个非常大的字符串形式:
a1 + b1 a2 + b2 a3 + b3 . . . an + bn
我需要将其转换为 C 数组操作:
a[1]+b[1]; a[2]+a[2]; . . . a[n]+b[n];
您建议使用什么正则表达式以及使用哪种工具?我正在尝试 jedit 的正则表达式,但如果需要我可以切换。
非常感谢 :)
使用 jEdit:
搜索:
([a-z]+)([0-9]+)
用。。。来代替:
$1[$2]