함수 preg_split()

1 개요[ | ]

함수 preg_split()

2 같이 보기[ | ]

3 C++[ | ]

#include <iostream>
#include <vector>
#include <regex>
using namespace std;

int main() {
    string in = "aaa1bbb2ccc";
    regex rx("[0-9]");
    sregex_token_iterator iter(in.begin(), in.end(), rx, -1), end;
    vector<string> strs{iter, end};
    for (string s: strs) cout << s << ' '; // aaa bbb ccc 
}

4 JavaScript[ | ]

console.log( 'aaa1bbb2ccc'.split(/[0-9]/) );

5 PHP[ | ]

$keywords = preg_split('/[0-9]/', 'aaa1bbb2ccc');
print_r($keywords);
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}