# Populate new tag with rip date from EACLOG

**URL:** <https://community.mp3tag.de/t/populate-new-tag-with-rip-date-from-eaclog/49192>\
**Category:** Support\
**Created:** [June 4, 2020, 8:57am UTC](https://community.mp3tag.de/t/populate-new-tag-with-rip-date-from-eaclog/49192 "2020-06-04T08:57:10Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![gsa999](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/c6cbf5/32.png) [@gsa999](https://community.mp3tag.de/u/gsa999)\
**Post date:** [June 4, 2020, 8:57am UTC](https://community.mp3tag.de/t/populate-new-tag-with-rip-date-from-eaclog/49192/1 "2020-06-04T08:57:10Z")

</div>

Hi  
I'm trying to populate a new RIPDATE tag from an embedded EACLOG file using Regex, but struggling.

The date appears on the second row of an EACLOG file in the format:

EAC extraction logfile from 23. March 2013, 9:35

So in the case above I want to populate the field with  
23/03/2013 09:35:00  
Unfortunately because seconds don't appear in the EACLOG file I will have to default to 00

This was my start using Format Value action, but I get a syntax error  
`$regexp(%EACLOG%,'(.*EAC extraction logfile from ).+?($.*)','$1'`

At this point I was just trying to see if I could get the text (ie 23. March 2013, 9:35 in above example) to appear in the new tag, before then trying to format it correctly as a date and time, but I appear to have failed at the first hurdle  
Any help appreciated  
Thanks  
G

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [June 4, 2020, 9:04am UTC](https://community.mp3tag.de/t/populate-new-tag-with-rip-date-from-eaclog/49192/2 "2020-06-04T09:04:50Z")

</div>

> [@gsa999](#):
>
> `$regexp(%EACLOG%,'(.*EAC extraction logfile from ).+?($.*)','$1'`

If this is the accurate copy, then it is missing the closing parenthesis at the end.  
`$regexp(%EACLOG%,'(.*EAC extraction logfile from ).+?($.*)','$1')`  
If you want to address the linebreaks in a text file, use `\r\n` - the $ indicates the "end-of-field" or the start of $1, $2 etc.

---

<div class="post-metadata">

**Author:** ![gsa999](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/c6cbf5/32.png) [@gsa999](https://community.mp3tag.de/u/gsa999)\
**Post date:** [June 4, 2020, 9:14am UTC](https://community.mp3tag.de/t/populate-new-tag-with-rip-date-from-eaclog/49192/3 "2020-06-04T09:14:39Z")

</div>

Ah yes. closing bracket missing. Now added and what I get in the field is

> Exact Audio Copy V0.99 prebeta 5 from 4. May 2009  
> EAC extraction logfile from

I want to grab the next bit of text after that up to the end of that line. How do I do that and then how can I convert that into a proper date time format  
Thanks

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [June 4, 2020, 9:23am UTC](https://community.mp3tag.de/t/populate-new-tag-with-rip-date-from-eaclog/49192/4 "2020-06-04T09:23:54Z")

</div>

> [@gsa999](#):
>
> I want to grab the next bit of text after that

So it is a pattern like  
`.*logfile from\r\n(.*)`  
?  
It would be much easier if we could see a real life piece of complete text.

---

<div class="post-metadata">

**Author:** ![gsa999](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/c6cbf5/32.png) [@gsa999](https://community.mp3tag.de/u/gsa999)\
**Post date:** [June 4, 2020, 9:39am UTC](https://community.mp3tag.de/t/populate-new-tag-with-rip-date-from-eaclog/49192/5 "2020-06-04T09:39:15Z")

</div>

> [@ohrenkino](#):
>
> ._logfile from\r\n(._)

Thanks for your help. Apologies I guess I assumed that the format of an EACLOG file was known. I have attached one here.  
[EAClogfile.log](https://community.mp3tag.de/uploads/short-url/mmhS4tzRi8DRA5eNkrC2Q0LvQhq.log) (3.2 KB)

Second row is the key row where the ripdate appears

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [June 4, 2020, 9:51am UTC](https://community.mp3tag.de/t/populate-new-tag-with-rip-date-from-eaclog/49192/6 "2020-06-04T09:51:12Z")

</div>

With this source text

```
Exact Audio Copy V0.99 prebeta 5 from 4. May 2009

EAC extraction logfile from 23. March 2013, 9:35

Blue Öyster Cult / Agents Of Fortune (Remastered 2001)

```

The expression  
`$regexp(%eaclog%,.*logfile from (.*)\r\n.*,$1)`  
produces  
`23. March 2013, 9:35`

---

<div class="post-metadata">

**Author:** ![gsa999](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/c6cbf5/32.png) [@gsa999](https://community.mp3tag.de/u/gsa999)\
**Post date:** [June 4, 2020, 10:34am UTC](https://community.mp3tag.de/t/populate-new-tag-with-rip-date-from-eaclog/49192/7 "2020-06-04T10:34:26Z")

</div>

> [@ohrenkino](#):
>
> ._logfile from (._)\r\n.\*,$1)

Interesting, I am getting the following with this code - ie the rows below are being included as well

```
23. March 2013, 9:35
 
Blue Öyster Cult / Agents Of Fortune (Remastered 2001)

```

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [June 4, 2020, 10:37am UTC](https://community.mp3tag.de/t/populate-new-tag-with-rip-date-from-eaclog/49192/8 "2020-06-04T10:37:32Z")

</div>

Perhaps my string was too short.  
Try  
`$regexp(%eaclog%,.*logfile from (.*?)\r\n.*,$1)`

(if you have code examples, please enclose them in accent grave - otherwise the forum parser likes to eat up asterisks and other characters)

---

<div class="post-metadata">

**Author:** ![gsa999](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/c6cbf5/32.png) [@gsa999](https://community.mp3tag.de/u/gsa999)\
**Post date:** [June 4, 2020, 1:19pm UTC](https://community.mp3tag.de/t/populate-new-tag-with-rip-date-from-eaclog/49192/9 "2020-06-04T13:19:13Z")

</div>

Thanks - that has worked. Now trying to remove the . after the 23 and also the comma after the year. Have an Action following the above regexp which says:

`REPLACE "RIPDATE": $or('.',',') -> ""`

I thought I had to escape the . and the , with single quotes, but this does not appear to work. Is there a better way of doing it?

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [June 4, 2020, 3:09pm UTC](https://community.mp3tag.de/t/populate-new-tag-with-rip-date-from-eaclog/49192/10 "2020-06-04T15:09:39Z")

</div>

> [@gsa999](#):
>
> REPLACE "RIPDATE": $or('.',',') -\> ""

This syntax has nothing to do with MP3tag.  
Please see tthe help on scripting functions

> **[Scripting Functions – Mp3tag Documentation](https://docs.mp3tag.de/scripting/#string-functions)**
>
> Documentation on Mp3tag's scripting functions. Mp3tag is the universal Tag Editor.

Please note that the scripting functions can be used in actions where you have to enter a format string.  
In this case it would probably be "Format value".  
Such a format string could look like this:  
`$replace('23. March 2013, 9:35',.,/,",", March ,03/, April ,04/):00`  
Result is:  
`23/03/2013, 9:35:00`

---

<div class="post-metadata">

**Author:** ![gsa999](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/c6cbf5/32.png) [@gsa999](https://community.mp3tag.de/u/gsa999)\
**Post date:** [June 5, 2020, 7:30am UTC](https://community.mp3tag.de/t/populate-new-tag-with-rip-date-from-eaclog/49192/11 "2020-06-05T07:30:04Z")

</div>

Thanks this works - how do I get rid of the comma after the year though.  
Also please could you explain what the ",", is actually doing (the bit after the conversion of the . to the /)

Thanks

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [June 5, 2020, 7:34am UTC](https://community.mp3tag.de/t/populate-new-tag-with-rip-date-from-eaclog/49192/12 "2020-06-05T07:34:36Z")

</div>

Add another action to the action group, this time of type "Replace"  
Search string: `,`  
Replace string:  
(leave empty)  
The comma is always a little tricky to replace with the scripting command.

---

<div class="post-metadata">

**Author:** ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)\
**Post date:** [June 5, 2020, 7:53am UTC](https://community.mp3tag.de/t/populate-new-tag-with-rip-date-from-eaclog/49192/13 "2020-06-05T07:53:29Z")

</div>

```
$replace(%RIPDATE%,.,/,',',, March ,03/, April ,04/):00
```

---

<div class="post-metadata">

**Author:** ![gsa999](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/c6cbf5/32.png) [@gsa999](https://community.mp3tag.de/u/gsa999)\
**Post date:** [June 5, 2020, 8:45am UTC](https://community.mp3tag.de/t/populate-new-tag-with-rip-date-from-eaclog/49192/14 "2020-06-05T08:45:15Z")

</div>

Thanks to both ohrenkino and dano. I now have the date and time correctly populated in a new tag. I now want to update the file creation and modified time to this date since many of my rips have lost the original file creation date as a result of being copied from 1 NAS to another.  
I have a feeling this cannot be done from within MP3 though, is this correct?  
Assuming yes I guess I will now need to export this date to a text file and use some sort of batch script to update from that  
Thx

---

<div class="post-metadata">

**Author:** ![gsa999](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/c6cbf5/32.png) [@gsa999](https://community.mp3tag.de/u/gsa999)\
**Post date:** [June 9, 2020, 4:51pm UTC](https://community.mp3tag.de/t/populate-new-tag-with-rip-date-from-eaclog/49192/15 "2020-06-09T16:51:35Z")

</div>

Hi - I'm trying to identify cases where I have multiple embedded EACLOGS in a tag. I have created the following Format action to create a temporary new tag

`$regexp(%EACLOG%,.*(End of status report\r\n\r\n------------------------------------------------------------)\r\n.*,`$1)

When the text "End of status report and multiple dashes" is present it finds them and populates this in the new tag BUT when they are **not** present it just populates the whole of the EACLOG tag in the new tag. When it does not find the text I want the new tag to remain blank. How do I do this?  
Thanks

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [June 10, 2020, 4:30am UTC](https://community.mp3tag.de/t/populate-new-tag-with-rip-date-from-eaclog/49192/16 "2020-06-10T04:30:21Z")

</div>

> [@gsa999](#):
>
> How do I do this?

Have a look at the scripting functions in the help:

> **[Scripting Functions – Mp3tag Documentation](https://docs.mp3tag.de/scripting/#string-functions)**
>
> Documentation on Mp3tag's scripting functions. Mp3tag is the universal Tag Editor.

esp. $strstr() to detect a string  
and the boolean functions around $if(), $if2().

And quite honestly: if this a one-off, then I would use a filter to show those files with  
eaclog HAS "End of status report" AND %eaclog% HAS "------------------------------------------------------------"

and then simply set the new field in the extended tags dialogue.

---

<div class="post-metadata">

**Author:** ![gsa999](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/c6cbf5/32.png) [@gsa999](https://community.mp3tag.de/u/gsa999)\
**Post date:** [June 10, 2020, 9:11am UTC](https://community.mp3tag.de/t/populate-new-tag-with-rip-date-from-eaclog/49192/17 "2020-06-10T09:11:02Z")

</div>

Ah why didn't I think of using a filter. Yes this is a one off and the filter above worked perfectly. Found 15 albums out of 4,800 that had the error. Now cleaned up. Thanks for your help  
G

---

<div class="post-metadata">

**Author:** ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)\
**Post date:** [February 9, 2026, 12:28pm UTC](https://community.mp3tag.de/t/populate-new-tag-with-rip-date-from-eaclog/49192/18 "2026-02-09T12:28:37Z")

</div>


