标签: php regex preg-match extract
答案 0 :(得分:4)
(£\d+|\d+%) off应该这样做,\d+部分表示'一个或多个数字'。
(£\d+|\d+%) off
\d+
答案 1 :(得分:1)
((?:£\d*|100%|[0-9][0-9]?%) off)
这个正则表达式可以帮助你
答案 2 :(得分:1)
试试这个:/^(.* off)/ Ui
编辑: 或/([0-9] +。off)/ Ui