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!
光阴似箭催人老,日月如移越少年。
Brother upstairs, the first suggestion is correct. echo matchstr(get(a,0),"[0-9]+")It is indeed empty, there is no problem
echo matchstr(get(a,0),"[0-9]+")
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]+"
Brother upstairs, the first suggestion is correct.
echo matchstr(get(a,0),"[0-9]+")
It is indeed empty, there is no problemI 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]+"