Populate new tag with rip date from EACLOG

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

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.

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

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.

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 (3.2 KB)

Second row is the key row where the ripdate appears

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)
23. March 2013, 9:35

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)

Perhaps my string was too short.
$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)

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?

This syntax has nothing to do with MP3tag.
Please see tthe help on scripting functions
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

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 /)


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.

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

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

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?

Have a look at the scripting functions in the help:
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.

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