Jump to content

regular expression problem


aritaro

Recommended Posts

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

 

Link to comment
https://forums.phpfreaks.com/topic/37019-regular-expression-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.