<?php // 前半が半角、後半が全角 $str = 'ABC123|ABC123'; if (preg_match_all('/\d+/', $str, $matches)) { var_dump($matches); } if (preg_match_all('/\d+/u', $str, $matches)) { var_dump($matches); }
You have javascript disabled. You will not be able to edit any code.