Jump to content

Removing text before and after keyphrase


stubarny1

Recommended Posts

Hello everyone,

 

I'm looking to turn this string:

 

$string = "jhdfgsdf984w5yisrek903_START_OF_WEBPAGE_http://www.google.com_END_OF_WEBPAGE"

 

into this string:

 

$string = "http://www.google.com"

 

before the phrase "_START_OF_WEBPAGE_" could be any types of symbol or character.

 

I've been trying to use regular expressions but can't seem to get them to work.

 

Many thanks for your help.

 

Stu

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.