What regex to use for this

后端 未结 6 1079
心在旅途
心在旅途 2021-01-19 05:57

I\'m writing a regex that will find either

  • 1 or more dots . .. ... .... followed by a space or not followe
6条回答
  •  粉色の甜心
    2021-01-19 06:41

    • To match one or more . characters followed by a space: /\.+ /
    • To match one or more . characters followed by nothing: /\.+$/
    • To match one or more ? characters followed by a space: /\?+ /
    • To match one or more ? characters followed by nothing: /\?+$/

    To match any of these patterns: /\.+ |\.+$|\?+ |\?+$/

提交回复
热议问题