Regex: How to match a string that is not only numbers

后端 未结 11 827
夕颜
夕颜 2020-11-30 03:18

Is it possible to write a regular expression that matches all strings that does not only contain numbers? If we have these strings:

  • abc
11条回答
  •  难免孤独
    2020-11-30 03:46

    .*[^0-9]{1,}.*
    

    Works fine for us.

    We want to use the used answer, but it's not working within YANG model.

    And the one I provided here is easy to understand and it's clear: start and end could be any chars, but, but there must be at least one NON NUMERICAL characters, which is greatest.

提交回复
热议问题