분할의 여러 분리기

코드 예제

12
0

분리하는 방법은 문자열에는 파이썬은 여러 구분 기호

>>> a='Beautiful, is; better*than\nugly'
>>> import re
>>> re.split('; |, |\*|\n',a)
['Beautiful', 'is', 'better', 'than', 'ugly']
0
0

분할 텍스트에 여러 가지 분리기

fn main() {
  let s = "Hey, is this a complex-program, or a complex_program";
  let chunks:Vec<_> = s.split(&[',', '-', '_'][..]).collect();

  println!("Split on multiple separators = {:?} ", chunks);
}

비슷한 페이지

예제가있는 유사한 페이지

다른 언어로

이 페이지는 다른 언어로되어 있습니다

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................