Jump to content

help with regex


aebstract

Recommended Posts

I have a string, something basically like:

 

$string = "a lot of text a lot of text a lot of text a lot of text a lot of text [[image.jpg]] a lot of text a lot of text a lot of text a lot of text  [[image2.jpg]] a lot of text a lot of text a lot of text a lot of text [[image3.jpg]]";

 

I'm needing to grab the first [[*]] value in the string, remove it from the string and set it as a variable, $firstimage.

Then I'll need to just delete all of the others from the string. Could someone help me with this, are there any real good resources for regex online? Thanks

Link to comment
https://forums.phpfreaks.com/topic/193777-help-with-regex/
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.