Link to home
Create AccountLog in
Avatar of Member_2_6478753
Member_2_6478753Flag for United States of America

asked on

php regex matchgin from a text problem :s

--		insert into alerts.dbo.Smile_Users (msisdn, smscount) values (@msisdn, 60)
--		set @reply = @message1 + ltrim(rtrim(str(30)))+' يوما'
--	end
--INSERT  INTO cgi_sms_services.dbo.cgi_sms_in(msisdn, sms_code, message, reqport, smstype)
-- VALUES (@msisdn, '1000000002',@reply, 84474, 'Alert') 

Open in new window

i don't want to select  if i have --[ multiple space ]Insert
i want only insert if is not have after the insert -- and spacesss

i have already use

if(preg_match_all("/([^-])(insert into .+\([^)]+\))/i",$string,$matches) )

Open in new window

but the problem with spaces:
Avatar of Derek Jensen
Derek Jensen
Flag of United States of America image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account