PHP preg_match()

1 개요[ | ]

PHP preg_match()
$subject = "abcdef";
$pattern = '/^def/';
preg_match($pattern, $subject, $matches);
print_r($matches);
# Array
# (
# )
$subject = "defghi";
$pattern = '/^def/';
preg_match($pattern, $subject, $matches);
print_r($matches);
# Array
# (
#     [0] => def
# )

2 같이 보기[ | ]

3 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}