I need help in regex php
It is necessary to use the number from parentheses, the parentheses are repeated in some cases
Example of two different strings:
- 2.0 16V Quadrifoglio (114 kW / 155 PS)
- 1.4 TB (940FXB1A) (125 kW / 170 PS)
I needed it to look like this:
- 2.0 16V Quadrifoglio 155 WORD
- 1.4 TB 170 WORD
I have code
- $text = '2.0 16V Quadrifoglio (114 kW / 155 PS)';
- preg_match('#\((.*?)\)#', $text, $match);
- print $match[1];
And results is:
114 kW / 155 PS
Please help to find number from parentheses