Title: String extraction
Last modified: July 5, 2020

---

# String extraction

 *  Resolved [ernstwg](https://wordpress.org/support/users/ernstwg/)
 * (@ernstwg)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/string-extraction/)
 * Hi David.
 * My copyright notice `[+iptc:2#116+]` looks like this `© 2018 Ernst Wilhelm Grueter,
   ewgfoto@posteo.de`. Is there a way to extract the email address in order to use
   it in case of a download at a later stage?
 * Or do you have another recommendation to store the email-adress. To me it seems,
   not all IPTC fields are accessible in wordpress.
 * Thank you very much, Ernst Wilhelm

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/string-extraction/#post-13080689)
 * Thanks for an interesting question.
 * I assume your email address does not change from file to file, so it would be
   easier to just enter it manually when you need it. Why bother to “**_extract 
   it_**“?
 * The answer may depend on what you mean by “**_use it in case of a download at
   a later stage_**“. Can you be more specific?
 * You wrote “**_To me it seems, not all IPTC fields are accessible in WordPress._**”
   The MLA `iptc:` prefix gives you access to all of the IPTC elements, and you 
   could define a rule to, for example, copy the value to a WordPress custom field.
 * If I have not understood your question, any further details you can provide will
   help me give you more specific guidance. Thanks.
 *  Thread Starter [ernstwg](https://wordpress.org/support/users/ernstwg/)
 * (@ernstwg)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/string-extraction/#post-13091587)
 * David
 * My comment about the completeness of IPTC Fields I am thinking of the [email adress in the creator contact info](https://iptc.org/std/photometadata/documentation/userguide/#_creators_contact_info).
   I have no idea how to get this piece of information, which can be set via Lightroom.
   So far I have not experience with word press custom fields. It sounds feasible,
   but how to get it?
 * Why bother? Firstly, in a previous life I worked as a programmer. Hardcoded stuff
   is not preferred =D Second: I work with some other guys in a club of amateur 
   photographers. When you think of a multi-user environment, it makes sense to 
   have this information in the picture. I can control my own workflow by putting
   this information into a certain IPTC attribute. Other photographers may add this
   information as part of a field like description, copyright notice or similar.
   The idea is, to inform the photographer about a download as a kind of appreciation.
 * Looking forward to your reply 🙂
 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/string-extraction/#post-13093055)
 * Thank you for clarifying your question. I was able to look at the metadata in
   one of your images and locate the information you need. From the IPTC documentation
   [How IPTC Photo Metadata Evolved Over Time](https://iptc.org/std/photometadata/documentation/userguide/#_how_iptc_photo_metadata_evolved_over_time)
   section:
 * >  After development over two decades IPTC Photo Metadata can be embedded in 
   > the following ways:
    - IPTC Core fields can be embedded in the IIM format and/or in the XMP format.
      A key challenge for metadata embedded in parallel in IIM and XMP is that the
      values are synchronised – this should be taken care of by the image management
      software.
    - IPTC Extension fields can be embedded only in XMP format.
 * MLA’s `iptc:` data sources are limited to the “Core Fields” because that is all
   the PHP function MLA uses to extract the data supports. The data you seek looks
   like this in the XMP metadata:
 *     ```
           'Iptc4xmpCore' => 
           array (
             'CreatorContactInfo' => 
             array (
               'CiAdrCity' => 'Hamburg',
               'CiAdrCtry' => 'Deutschland',
               'CiEmailWork' => 'ernst.grueter@gmail.com',
               'CiUrlWork' => 'https://ernst-wilhelm-grueter.de',
             ),
             'IntellectualGenre' => 'Demonstationen',
             'Location' => '2_Detail',
             'Scene' => 
             array (
               0 => '2_s',
             ),
             'SubjectCode' => 
             array (
               0 => 'Ostermarsch',
             ),
           ),
       ```
   
 * You can use MLA’s `xmp:` data sources to get the email address. Since the address
   is buried within nested arrays you need to use a compound name to specify it:
 *     ```
       [+xmp:Iptc4xmpCore.CreatorContactInfo.CiEmailWork+]
       ```
   
 * You can find more information about using compound names in the `xmp:` prefix
   section of the Documentation tab.
 * Copying the email address to a custom field would make accessing it more efficient.
   TO do that, follow the steps in this recent topic:
 * [Combine image ISO, Shutter speed, Aperture with decription](https://wordpress.org/support/topic/combine-image-iso-shutter-speed-aperture-with-decription/#post-13014353)
 * In those steps, replace “Change the Data Source dropdown to “post_content”.” 
   with these two steps:
    - Change the Data Source dropdown to “– Template (see below) –“.
    - Enter `([+xmp:Iptc4xmpCore.CreatorContactInfo.CiEmailWork+])` in the Meta/
      Template text box.
 * I hope that answers your question. I am marking this topic resolved, but please
   update it if you have any problems or further questions regarding the above suggestions.
   Thanks for your continued interest in the plugin.
 *  Thread Starter [ernstwg](https://wordpress.org/support/users/ernstwg/)
 * (@ernstwg)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/string-extraction/#post-13093493)
 * Good Morning, David. Very helpful. Very grateful for your willingness and abilty
   to help. First time I understood myself the difference between IPTC and IPTC 
   extensions and the different ways to access it.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘String extraction’ is closed to new replies.

 * ![](https://ps.w.org/media-library-assistant/assets/icon-256x256.png?rev=973502)
 * [Media Library Assistant](https://wordpress.org/plugins/media-library-assistant/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/media-library-assistant/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/media-library-assistant/)
 * [Active Topics](https://wordpress.org/support/plugin/media-library-assistant/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/media-library-assistant/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/media-library-assistant/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [ernstwg](https://wordpress.org/support/users/ernstwg/)
 * Last activity: [5 years, 11 months ago](https://wordpress.org/support/topic/string-extraction/#post-13093493)
 * Status: resolved