aritaro Posted February 4, 2007 Share Posted February 4, 2007 hi, I am new to regular expression, i and I would like use the preg_replace() to convert the below string: to Arg1 = abc123 !@#$ (any character) Arg2 = only alphanumaric at the beginning my reg exp is /\[code arg1=\"(.*?)\" arg2=\"(.*?)\"\]/si and this is totally fail! and i notice that use the . (match any character) cause the problem, but the problem is the first argument support any kind of character. How should i write my reg exp? help.. Thanks, arita ro Quote Link to comment Share on other sites More sharing options...
aritaro Posted February 4, 2007 Author Share Posted February 4, 2007 very sorry , i guess i found my problem when i use the htmlentities() to show my string, somehow it has become something like this Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.