<?php
$string = 'we 100.200.33 z';
//$string = 'we 100 200\'300,400,500,600,700,800,900 wf ';
//$string = 'ara +1.200.009z';
//$string = 'we 100,200,300,400,500,600,700,800,900 wf ';
//$string = 'we -100,200:300,400,500,600,700,800,900.9 wf ';
//$string = 'we +1200300400500600700800900.99 wf ';
//$string = 'we +1200300400500600700800900.99 wf';
//preg_match_all('/([+-])?[\d.,]+([.,]\d{1,2})?/', $string, $matches);
//preg_match_all("/[+-]?\d{1,3}[.,]+(\d{3}[.,'])(?R)?/", $string, $matches);
//preg_match_all("/[+-]?\d{1,3}[., ]?(?:\d{3}[., ]?)(?R)?/", $string, $matches);
//preg_match_all("/\d{1,3}(?:[,]?\d{3})(?R)?/", $string, $matches);
//preg_match_all('/[+-]?\d{1,3}(?:,?\d{3})*(?:\.\d{2})?/', $string, $matches);
preg_match_all('/(?<sign>^|\D)\d{1,3}(?:([,.:])?\d{3})*(?:(?<decimal_sep>[.,])\d{1,2}(?=\D))?/', $string, $matches);
print_r($matches);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename: /in/pMlcc
function name: (null)
number of ops: 10
compiled vars: !0 = $string, !1 = $matches
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
3 0 E > ASSIGN !0, 'we+100.200.33+z'
18 1 INIT_FCALL 'preg_match_all'
2 SEND_VAL '%2F%28%3F%3Csign%3E%5E%7C%5CD%29%5Cd%7B1%2C3%7D%28%3F%3A%28%5B%2C.%3A%5D%29%3F%5Cd%7B3%7D%29%2A%28%3F%3A%28%3F%3Cdecimal_sep%3E%5B.%2C%5D%29%5Cd%7B1%2C2%7D%28%3F%3D%5CD%29%29%3F%2F'
3 SEND_VAR !0
4 SEND_REF !1
5 DO_ICALL
21 6 INIT_FCALL 'print_r'
7 SEND_VAR !1
8 DO_ICALL
9 > RETURN 1
Generated using Vulcan Logic Dumper, using php 8.0.0
preferences:
170.32 ms | 1394 KiB | 17 Q