Jump to content

alan_g

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by alan_g

  1. Hi, We have a number of strings, which take on the basic format of fieldname followed by value. Each fieldname always starts with {$ and ends with $}. The fieldname is always made up of alphanumerics and spaces. I need to split the strings by the fieldname, so I have two componets 1. Fieldname 2. Value e.g. strings are: string: {$begin Take$} My story began string: {$a publication$} The daily newspaper string: {$ date of creation$} 04/06/2007 - so I would then have the parsed data as: fieldname:{$begin Take} value:My story began fieldname:{$a publication} value:The daily newspaper fieldname:{$ date of creation$} value:04/06/2007 We're doing this parsing in PHP and need the code/ help with the preg_split for this. All help very much appreciated Alan
×
×
  • Create New...