E-AC-3 & PS4 audio issue - always force transcode to AAC?

For help and support with Universal Media Server
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
knifeyspooney
Posts: 9
Joined: Mon Jan 06, 2020 2:02 am

E-AC-3 & PS4 audio issue - always force transcode to AAC?

Post by knifeyspooney »

Hey All,

Apologies for what may be a simple question as I'm relatively new to this, but I've recently run into an issue using UMS on my PS4 (in the PS4 Media Player app):

I'll have a file with two audio tracks, track 1 is the movie audio in E-AC-3 format (5.1 or 7.1, same issue present), and track 2 is the audio commentary track usually in AC-3 or AAC LC format. When attempting to play the file on the PS4, not using the transcode folder, it will default to track 2 and play the commentary track with no option to play the actual movie audio.

In trying to troubleshoot this compared to files that previously worked, it seems the PS4 can't play E-AC-3 audio. Bummer. Other files that also have two tracks of audio are fine and play the first track by default when that track is AC-3.

I can get the file to properly play track 1 by going into the Transcode folder and using the [FFmpeg Video][Audio: AC3/English] option.

But my question is this: is there a way to set UMS to automatically & always transocde all E-AC-3 audio to AC-3 for PS4 without having to navigate through the Transcode folder and find the one specific option? Can UMS be set to perform this transcode anytime audio track 1 is E-AC-3?




For the Trace logs I played the E-AC-3 track 1 file first, and it started playing the track 2 audio commentary instead of track 1. Then I played the same movie but a different encode/file where track 1 was AC-3, and it properly played track 1 by default. And finally I went into the Transcode folder and played the first file (the one with E-AC-3 track 1) using the FFmpeg/AC3 transcode option and it correctly played track 1.

Media info is below for the primary file (with E-AC-3 track 1), and secondary file (with AC-3 track 1)

E-AC-3 track 1 audio:

Code: Select all

Complete name                            : F:\Movies\Toy Story 4\Toy.Story.4.2019.1080p.BluRay.DDP7.1.x264-BBQ.mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 12.3 GiB
Duration                                 : 1 h 40 min
Overall bit rate                         : 17.6 Mb/s
Encoded date                             : UTC 2019-10-11 03:48:18
Writing application                      : mkvmerge v38.0.0 ('The Silent Type') 64-bit
Writing library                          : libebml v1.3.9 + libmatroska v1.5.2
Attachments                              : 方正准圆_GBK.TTF / 方正黑体_GBK.TTF

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : [email protected]
Format settings                          : CABAC / 5 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 5 frames
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 1 h 40 min
Bit rate                                 : 16.0 Mb/s
Width                                    : 1 920 pixels
Height                                   : 804 pixels
Display aspect ratio                     : 2.40:1
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.432
Stream size                              : 11.2 GiB (91%)
Writing library                          : x264 core 158 r2984+47 456d10a t_mod_New [0-bit@all X86_64]
Encoding settings                        : cabac=1 / ref=5 / deblock=1:-3:-3 / analyse=0x3:0x133 / me=umh / subme=11 / psy=1 / fade_compensate=0.00 / psy_rd=0.85:0.00 / mixed_ref=1 / me_range=64 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-2 / threads=36 / lookahead_threads=6 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / fgo=0 / bframes=10 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=0 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=24 / scenecut=40 / intra_refresh=0 / rc_lookahead=70 / rc=2pass / mbtree=0 / bitrate=16000 / ratetol=1.0 / qcomp=0.60 / qpmin=0:0:0 / qpmax=36:36:36 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=62500 / vbv_bufsize=78125 / nal_hrd=none / filler=0 / ip_ratio=1.40 / pb_ratio=1.20 / aq=3:0.70 / aq-sensitivity=10.00 / aq-factor=1.00:1.00:1.00 / aq2=0 / aq3=0 / zones=790,801,b=1.7/2488,2563,b=1.7/2581,2629,b=1.7/2671,2705,b=1.7/2706,2770,b=1.7/2959,2982,b=1.7/2983,2997,b=1.7/3150,3161,b=1.7/3212,3232,b=1.7/3233,3309,b=1.7/10676,10706,b=1.7/31417,31504,b=1.7/53330,53360,b=1.7/54396,54512,b=1.7/58335,58336,b=1.7/59753,59899,b=1.7/61779,61870,b=1.7/71782,71952,b=1.7/73318,73394,b=1.7/74779,74906,b=1.7/82311,82375,b=1.7/82990,83083,b=1.7/87945,87991,b=1.7/109914,110048,b=1.7/113475,113513,b=1.7/113550,113568,b=1.7/113613,113696,b=1.7/114139,114169,b=1.7/127715,127843,b=1.7/127898,127945,b=1.7/128052,128531,b=1.7/128563,128577,b=1.7/129329,129839,b=1.7/130246,130837,b=1.7/132097,132098,b=1.7/132104,132721,b=1.7/132727,132730,b=1.7/142831,142858,b=1.7/134620,142830,b=0.3
Default                                  : Yes
Forced                                   : No
Color range                              : Limited
Color primaries                          : BT.709
Matrix coefficients                      : BT.709

Audio #1
ID                                       : 2
Format                                   : E-AC-3
Format/Info                              : Enhanced AC-3
Commercial name                          : Dolby Digital Plus
Format profile                           : Blu-ray Disc
Codec ID                                 : A_EAC3
Duration                                 : 1 h 40 min
Bit rate mode                            : Constant
Bit rate                                 : 1 536 kb/s
Channel(s)                               : 8 channels
Channel layout                           : L R C LFE Ls Rs Lb Rb
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Compression mode                         : Lossy
Stream size                              : 1.07 GiB (9%)
Language                                 : English
Service kind                             : Complete Main
Default                                  : Yes
Forced                                   : No

Audio #2
ID                                       : 3
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : A_AAC-2
Duration                                 : 1 h 40 min
Bit rate                                 : 102 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Delay relative to video                  : 20 ms
Stream size                              : 73.1 MiB (1%)
Title                                    : Commentary with director Josh Cooley and co-producer Mark Nielsen
Language                                 : English
Default                                  : No
Forced                                   : No
AC-3 track 1 audio:

Code: Select all

omplete name                            : F:\Movies\Toy Story 4\Toy Story 4 2019 720p BluRay DD5.1 x264-LoRD.mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 5.00 GiB
Duration                                 : 1 h 40 min
Overall bit rate                         : 7 161 kb/s
Encoded date                             : UTC 2019-09-30 22:53:26
Writing application                      : mkvmerge v37.0.0 ('Leave It') 64-bit
Writing library                          : libebml v1.3.9 + libmatroska v1.5.2

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : [email protected]
Format settings                          : CABAC / 12 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 12 frames
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 1 h 40 min
Bit rate                                 : 6 200 kb/s
Width                                    : 1 280 pixels
Height                                   : 536 pixels
Display aspect ratio                     : 2.40:1
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.377
Stream size                              : 4.33 GiB (87%)
Writing library                          : x264 core 158 r2984+49 ~ LoRD  
Encoding settings                        : cabac=1 / ref=12 / deblock=1:-3:-3 / analyse=0x3:0x133 / me=umh / subme=10 / psy=1 / fade_compensate=0.00 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=32 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=0 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / fgo=0 / bframes=8 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=2pass / mbtree=0 / bitrate=6200 / ratetol=1.0 / qcomp=0.60 / qpmin=0:0:0 / qpmax=69:69:69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=50000 / vbv_bufsize=62500 / nal_hrd=none / filler=0 / ip_ratio=1.25 / pb_ratio=1.25 / aq=3:0.90 / aq-sensitivity=10.00 / aq-factor=1.00:1.00:1.00 / aq2=0 / aq3=0
Language                                 : English
Default                                  : Yes
Forced                                   : No

Audio #1
ID                                       : 2
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Commercial name                          : Dolby Digital
Codec ID                                 : A_AC3
Duration                                 : 1 h 40 min
Bit rate mode                            : Constant
Bit rate                                 : 640 kb/s
Channel(s)                               : 6 channels
Channel layout                           : L R C LFE Ls Rs
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Compression mode                         : Lossy
Stream size                              : 458 MiB (9%)
Language                                 : English
Service kind                             : Complete Main
Default                                  : Yes
Forced                                   : No

Audio #2
ID                                       : 3
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Commercial name                          : Dolby Digital
Codec ID                                 : A_AC3
Duration                                 : 1 h 40 min
Bit rate mode                            : Constant
Bit rate                                 : 320 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Compression mode                         : Lossy
Stream size                              : 229 MiB (4%)
Title                                    : Commentary by Director Josh Cooley and co-Producer Mark Nielsen
Language                                 : English
Service kind                             : Complete Main
Default                                  : No
Forced                                   : No
Appreciate any insight or help in modifying the config file(s) you may be able to provide.

Thanks for reading!
Attachments
ums_dbg.zip
(102.87 KiB) Downloaded 601 times
Nadahar
Posts: 1990
Joined: Tue Jun 09, 2015 5:57 pm

Re: E-AC-3 & PS4 audio issue - always force transcode to AAC?

Post by Nadahar »

This seems like a bug in UMS to me, it parses the EAC-3 track as AC3 and thus thinks that the PS4 can play it. My prediction is that if you had a file with only EAC-3 track(s), it would fail to play completely unless you used the TRANSCODE folder.

Log excerpt showing the bug (compare the media info information with the "parsing results": Id: 0, Language Code: eng, Audio Codec: AC3):

Code: Select all

  Format: "Matroska"            Duration: 1:40:03.497         Overall Bitrate: 17648538     Cover: No
  FPS: 23.976
  - Video track ID: 1
    Format: "AVC"                 Profile: "[email protected]"          CodecID: "V_MPEG4/ISO/AVC"    Duration: 1:40:03.456
    Bitrate: 16000000             Width: 1920                   Height: 804                   Colorimetry: 4:2:0
    Chroma: 4:2:0                 Matrix Co: BT.709             PAR: 1.000                    DAR: 2.40:1
    Scan Type: Progressive        FPS: 23.976                   Framerate Mode: CFR           RefFrames: 5
    Bit Depth: 8                  Delay: 0                      Delay Source: Container
  - Audio track ID: 2
    Format: "AC-3"                Profile: "E-AC-3+Dep / AC-3"  CodecID: "A_EAC3"             Duration: 1:40:03.488
    BitRate Mode: CBR             Bitrate: 1536000              Language: "en"                Channel(s): 8 / 6
    Samplerate: 48000             Delay: 0                      Delay Source: Container
  - Audio track ID: 3, Title: "Commentary with director Josh Cooley and co-producer Mark Nielsen"
    Format: "AAC"                 Profile: "LC"                 CodecID: "A_AAC-2"            Duration: 1:40:03.488
    Bitrate: 102157               Language: "en"                Channel(s): 2                 Samplerate: 48000
    Delay: 20                     Delay Source: Container
  - Subtitle ID: 4
    Format: "UTF-8"               Language: "en"
  - Subtitle ID: 5, Title: "SDH"
    Format: "UTF-8"               Language: "en"
  - Subtitle ID: 6, Title: "Chinese Simplified and English"
    Format: "ASS"                 Language: "zh"
  - Subtitle ID: 7, Title: "Chinese Simplified"
    Format: "UTF-8"               Language: "zh"
  - Subtitle ID: 8, Title: "Chinese Traditional and English"
    Format: "ASS"                 Language: "zh"
  - Subtitle ID: 9, Title: "Chinese Traditional"
    Format: "UTF-8"               Language: "zh"
  - Subtitle ID: 10
    Format: "UTF-8"               Language: "fr"
  - Subtitle ID: 11
    Format: "UTF-8"               Language: "el"
  - Subtitle ID: 12
    Format: "UTF-8"               Language: "ro"
  - Subtitle ID: 13, Title: "Latin American"
    Format: "UTF-8"               Language: "es"
  - Subtitle ID: 14, Title: "Commentary with director Josh Cooley and co-producer Mark Nielsen"
    Format: "UTF-8"               Language: "en"
  - Subtitle ID: 15, Title: "Commentary with director Josh Cooley and co-producer Mark Nielsen (SDH)"
    Format: "UTF-8"               Language: "en"
  - Subtitle ID: 16, Title: "Commentary with director Josh Cooley and co-producer Mark Nielsen"
    Format: "UTF-8"               Language: "fr"
  - Subtitle ID: 17, Title: "Commentary with director Josh Cooley and co-producer Mark Nielsen"
    Format: "UTF-8"               Language: "es"
TRACE 2020-01-05 13:07:32.328 [HTTPv2 Request Worker 6] net.pms.formats.Format Parsing results for file "Toy.Story.4.2019.1080p.BluRay.DDP7.1.x264-BBQ.mkv": Container: MKV, Size: 13244118647, Video Bitrate: 17648538, Video Tracks: 1, Video Codec: h264, Duration: 1:40:03.497, Video Resolution: 1920 x 804, Display Aspect Ratio: 2.39:1, Scan Type: Progressive, Frame Rate: 23.976, Frame Rate Mode: CFR (CFR), Frame Rate Mode Raw: CFR, Matrix Coefficients: BT.709, AVC Level: 4.1, Audio Tracks: 2 [Id: 0, Language Code: eng, Audio Codec: AC3, Bitrate: 1536000, Channels: 8, Sample Frequency: 48000 Hz], [Id: 1, Language Code: eng, Audio Track Title From Metadata: Commentary with director Josh Cooley and co-producer Mark Nielsen, Audio Codec: AAC-LC, Bitrate: 102157, Channels: 2, Sample Frequency: 48000 Hz], Subtitle Tracks: 14 [Embedded, id: 0, type: SUBRIP, lang: eng], [Embedded, id: 1, type: SUBRIP, subtitles track title from metadata: SDH, lang: eng], [Embedded, id: 2, type: ASS, subtitles track title from metadata: Chinese Simplified and English, lang: chi], [Embedded, id: 3, type: SUBRIP, subtitles track title from metadata: Chinese Simplified, lang: chi], [Embedded, id: 4, type: ASS, subtitles track title from metadata: Chinese Traditional and English, lang: chi], [Embedded, id: 5, type: SUBRIP, subtitles track title from metadata: Chinese Traditional, lang: chi], [Embedded, id: 6, type: SUBRIP, lang: fre], [Embedded, id: 7, type: SUBRIP, lang: gre], [Embedded, id: 8, type: SUBRIP, lang: rum], [Embedded, id: 9, type: SUBRIP, subtitles track title from metadata: Latin American, lang: spa], [Embedded, id: 10, type: SUBRIP, subtitles track title from metadata: Commentary with director Josh Cooley and co-producer Mark Nielsen, lang: eng], [Embedded, id: 11, type: SUBRIP, subtitles track title from metadata: Commentary with director Josh Cooley and co-producer Mark Nielsen (SDH), lang: eng], [Embedded, id: 12, type: SUBRIP, subtitles track title from metadata: Commentary with director Josh Cooley and co-producer Mark Nielsen, lang: fre], [Embedded, id: 13, type: SUBRIP, subtitles track title from metadata: Commentary with director Josh Cooley and co-producer Mark Nielsen, lang: spa], Mime Type: video/x-matroska
knifeyspooney
Posts: 9
Joined: Mon Jan 06, 2020 2:02 am

Re: E-AC-3 & PS4 audio issue - always force transcode to AAC?

Post by knifeyspooney »

Interesting. Thanks for taking a look!

So if that's the case, then making a determination based on E-AC-3 audio present (to then decide to auto transcode) wouldn't work because it may not be properly detecting E-AC-3?

Is there a way to override whatever the audio format is on track 1, and always transcode track 1 audio to AC3 or AAC no matter what?
Nadahar
Posts: 1990
Joined: Tue Jun 09, 2015 5:57 pm

Re: E-AC-3 & PS4 audio issue - always force transcode to AAC?

Post by Nadahar »

There's no way to transcode only selected tracks - either the whole file is transcoded or it isn't. But, if the parsing worked correctly, this file should have been transcoded for the PS4 exactly because it doesn't support EAC3.

You can modify your renderer configuration to always transcode video files, or a bit better remove AC-3 from "supported", which would mean that both EAC3 and AC3 would be transcoded. But, the proper remedy is for the bug to be fixed.
User avatar
mik_s
Moderator
Posts: 1115
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: E-AC-3 & PS4 audio issue - always force transcode to AAC?

Post by mik_s »

I think it would be a good idea for you to be able to define unsupported formats in the config, so for edge cases like this when the parseing dosn't quite get the right result due to the combination of different audio tracks in different formats.
If say we had something like

Code: Select all

unsupported = a:eac3
then anything that had that format would be transcoded.

There is a "StreamExtensions" the config which is taken over by "supported" when mediainfo is set to true.
Makes sense to have an "unsupported" to take over from "TranscodeExtensions" :idea:

I'm guessing the it could be added fairly easily in future versions of UMS as it can use the exact same logic already in place, just adding one extra check.
Logs are important for us to help, Please follow This Link before asking for support. Just a forum cleaner, Will help if I can but no expert.
Nadahar
Posts: 1990
Joined: Tue Jun 09, 2015 5:57 pm

Re: E-AC-3 & PS4 audio issue - always force transcode to AAC?

Post by Nadahar »

It wouldn't be quite as easy as you seem to think, but it would absolutely be doable. I'm not sure there would be much benefit though, as it is now, everything that isn't "supported" is by definition "unsupported". It doesn't really matter if you define it "one way or the other".

The reason this can't be solved by configuration, is that it's a bug in UMS. This bug didn't use to be there, and I have a strong suspicion that it is caused by changes in MediaInfo (and the way it outputs "multi-layer codecs") and that whoever upgraded the MediaInfo version shipped with UMS didn't check the changes properly.

In fact, I'm pretty sure that if you replace the MediaInfo.DLL file with a MediaInfo version before 18 (I think these changes happened "early" in the 18's, like 18.04 or something like that, but I don't remember exactly), that it will work with the current code.
User avatar
mik_s
Moderator
Posts: 1115
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: E-AC-3 & PS4 audio issue - always force transcode to AAC?

Post by mik_s »

I think there would be some benefit having an unsupported tag, especially if setting up a new renderer config and you don't know what is supported, but you do know the odd thing that isn't then you could add it there. or even combine both supported and unsupported into more powerful and simpler config.

maybe you could have something like

Code: Select all

  Supported = f:mkv                                                                          m:video/x-matroska
Unsupported = f:mkv           v:h265                       a:eac3
instead of

Code: Select all

Supported = f:mkv             v:h264|mp4|mpeg2|vp8|vp9     a:mp3|ac3|aac-lc|he-aac|adpcm|dts  m:video/x-matroska
When i was doing one for Movian on my PS3 I could have used somthing like this as it will play just about anything but h265 had to be transcoded as the cpu in the PS3 wasn't fast enough to be watchable. It was a pain trying to write every format in as supported when one line saying h265 was unsupported would have done it.


Anyway back to @knifeyspooney's problem
Just wondering what would happen if track 1 was main audio in E-AC-3, track 2 was the same but in AC3 and track 3 for commentry in AAC-LC. Should the file be transcoded? I would assume the player would automatically pick the next supported track if it didn't recognise the first, which is probably what is happening here. It just happens that there is no fallback track in this case.

I remember DVD's that were similar having one track for surround in some format, one for stereo and another for the commentry, and if the DVD player didn't have support for that type of surround, track 2 would play instead of track 1.

It does look like a bug in the mediainfo allowing it to match though :shock:
Logs are important for us to help, Please follow This Link before asking for support. Just a forum cleaner, Will help if I can but no expert.
Nadahar
Posts: 1990
Joined: Tue Jun 09, 2015 5:57 pm

Re: E-AC-3 & PS4 audio issue - always force transcode to AAC?

Post by Nadahar »

The bug isn't in MediaInfo, the bug is in UMS in that UMS' code hasn't been updated to match the changes made in MediaInfo.

That said, you can already do "everything except" in the current system, since it uses regex. But, that would mean you'd have to learn some regex to use it ;)

A simple "not containing" is like this: https://www.regextester.com/15
This means that

Code: Select all

v:^(?:(?!h265).)*$
would probably achieve what you want.

edit: The above is probably overly complicated in this case, since it will ensure that the string "h265" is nowhere within the code. But, we know that, in the case of h265, the code IS "h265", so we can get away with just that it's not there in the first position. In addition, I THINK UMS automatically adds the anchors (^ and $), so those can be omitted. Completely untested, I something like this would do it:

Code: Select all

v:(?!h265).
User avatar
mik_s
Moderator
Posts: 1115
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: E-AC-3 & PS4 audio issue - always force transcode to AAC?

Post by mik_s »

didn't realise that regex was used matching supported formats, I really should have given it a try :D
I have tried a bit of regex to write a rename script for standardising and sorting my videos and found that it is very powerful but it is a bit of a dark art, unless it's something you use on a regular basis it is hard to get your head round it. :?
Logs are important for us to help, Please follow This Link before asking for support. Just a forum cleaner, Will help if I can but no expert.
Nadahar
Posts: 1990
Joined: Tue Jun 09, 2015 5:57 pm

Re: E-AC-3 & PS4 audio issue - always force transcode to AAC?

Post by Nadahar »

Hehe, it isn't really that "black", but it's a lot to remember. I'd say that I use it "semi-frequently", so the things I use often I know without thinking. But, as soon as I move beyond my "comfort zone", I have to look up syntax/codes and test the expressions.

I wrote a small regex tester back in... 2005 I think, that I use to test my expressions. It's a simple program where you can write or paste a regex and a text, and the results are shown below (total match, groups etc). I think it's been helpful over the years, as it has lowered my threshold to use it since I can easily check that they do what I want. These days, there are dozens of online regex testers that anyone can use that does what my program does and more, but that wasn't the case back when I made it.

The thing that usually trick me, is all the different "flavors". Hardly any implementations are exactly equal, when I started using regex'es I was writing Pascal/Delphi using a library that used the "Perl regex rules". Regex'es that work fine there, don't always work with Java's regex engine, so I've had to get used to some of the "Java quirks". Then there are Javascript, PHP, C# and others that have their own quirks/differences, which can make it more painful that simply "knowing regex". So, when choosing an online tester to use, one should make sure that it use the same regex "flavor" that one intends to use the regex for. Most online testers are written in JavaScript, so they often output the results as evaluated by JavaScript.
Post Reply