I have string similar to this one:
{{something1}} something2 {{something3}} something4
How can I match only "something1" using the preg_match()
function?
I tried:
preg_match("/{{(.*)}}/si",$content,$matches);
but this matched too much, returning
something1}} something2 {{something3
I tried adding
to the pattern, but didn't get what I want that way either.
Could you please help me with this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…