let a=['','']
echo matchstr(get(a,0),"[0-9] \+")
echo matchstr(get(a,1),"\d\+")
all display empty string
:s/\d\+/xxx/cg
can match 4
but the {pat} in matchstr() is unsuccessful!
巴扎黑2017-05-16 16:40:50
Brother upstairs, the first suggestion is correct. echo matchstr(get(a,0),"[0-9]+")
It is indeed empty, there is no problem
我想大声告诉你2017-05-16 16:40:50
I haven’t written it before, but I feel it is a problem with "". It is recommended to try:
1. Two \ For example: "[0-9]\+"
2. Remove For example: "[0-9]+"