Jump to content

Recommended Posts

I have a string of text and I need to get what is in the middle of two specific things

 

 

Hello *wiki black end* everyone!

 

Using the above as an example how would I get php to get only black? Both the words Hello and everyone! will change to random things input by the user.

Literally anything with some of these tags

 

*vocab
*def
*wiki
*english
*spanish
end*

 

They are always ended with end*. I want to get the information between the beginning tag (*def etc.) and the end* tag.

 

Here are some random examples.

 

The light of a *wiki black light end* is a weird one

 

In this case I am trying to get "black light" out of the string.

 

*spanish la tarea end*

 

la tarea in this example

 

the first *vocab ionization energy end* is 1923kJ/mol

 

and in this case ionization energy. If you need anything else let me know.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.