10

I am trying to figure out if it's possible to search through code and stop at lines that contain Chinese characters?

hippietrail
  • 4,605
BlaBlaBla
  • 111

1 Answers1

15

Search for Chinese characters using regular expressions in Visual Studio. The regular expression [一-龥] matches any Chinese character.

The regular expression ^.*[一-龥] matches any line containing a Chinese character.

  • ^ Anchor the match string to the beginning of a line
  • .* Match any character zero or more times (wildcard *)
  • [a-f] Match any character in a range of characters, for example, [一-龥] matches any character in the range of Chinese characters starting with the first Chinese character and ending with the last Chinese character .
karel
  • 13,706