On Wed, Oct 21, 2020 at 11:22:40AM +0800, Li Yuanchao wrote:
On Wed, Oct 21, 2020 at 10:46:29AM +0800, Zhang Yuhang wrote:
Error Flow:
- /\d+$/ will be matched, such as "xxx123".
Do you mean "xxx123" is an error example because it doesn't have '--' or '-' within? Then you can say
such as "xxx123", which has no '--' or '-' in it.
That would be easy to understand.
Thanks, Yuanchao
Because /^vm-.*-\d\w*-([a-zA-Z]+)|(\d+)$)/ mean for /^vm-.*-\d\w*-([a-zA-Z]+)/ or /\d+)$/
It will match /\d+$/, and match such as "xxx123". That is the error point. Not because of it doesn't have '--' or '-' within.
It doesn't have '--' or '-' within, which is the result of fault regex. :)
Thanks, Zhang Yuhang