How can i found word in string using regex or not in this string
String is Mysql Query
SELECT
id,
name,
desc,
(SELECT id as lid FROM comments WHERE lid = id order by id desc limit 1) as lid_com
FROM posts limit 3
here i want to search for limit in the last of string
string may be
limit 3
limit 3, 3
limit 3 , 3
limit 3 ,3
3 here may be any number
i tried this regex but i'm beginner
"/ limit [0-9]{0,9}+\,[0-9]{0,9} /i$"
how can i do this
Thank you