Regular expression to match any vertical whitespace

后端 未结 2 429
野趣味
野趣味 2021-01-20 17:57

Is there a regex pattern for .NET that will match any character that will result in multiple lines, i.e. any vertical whitespace character, like perl regex does with \

2条回答
  •  旧时难觅i
    2021-01-20 18:50

    If one wants to match any unknowns simply us the not set [^ ] (at least in .Net, my perl is a little hazy) to match up to a specific character. For example if I wanted to match whitespace between from a current position across a line to the next line which starts with the letter D I would use this

    ([^D]+)

    So the match capture would include every type of whitespace there is up to the letter D.

提交回复
热议问题