使用js正则进行截取:
1.截取两个字符中间的字符
var submit = 6.2.12345abcd
submit.match(/6.2.(S*)abcd/)[1];
2.截取某个字符后面的字符
var submit = 6.2.12345abcd
submit.match(/6.2.(S*)/)[1];
3.截取某个字符前面的字符
var submit = 6.2.12345abcd
submit.match(/(S*)abcd/)[1];
参考文档:https://blog.csdn.net/weixin_42253621/article/details/113360888