INTERACT FORUM
More => Old Versions => JRiver Media Center 19 for Windows => Topic started by: chrisjj on January 19, 2014, 06:04:15 pm
-
Having seen http://wiki.jriver.com/index.php/Expression_Language#Regex
The regular expression implementation used prior to Media Center 19 is the Microsoft 2010 TR1 engine, and in Media Center 19 it is the Boost engine.
I'd like to know: Are MC19 regexp's compatible with previous versions'? Or will I have to adjust the regexp's in e.g. Calcualted Data field expressions?
Thanks.
-
MC19 now uses Boost regular expressions. They should generally be a superset of the previously-used Microsoft TR1 expressions. I haven't done a thorough survey though. Nor have to bothered yet to figure out which Boost flavor are being used.
If someone with source code access can tell me which flavor / variant is being used, that would be useful.
-
Thanks MrC. If there's any official documentation about the switch of regexp engine, I'd be interested to see it. I've found only that mention in the wiki.
-
I've only seen it here:
19.0.46 (9/26/2013)
1. First build of MC19 for Mac.
2. Changed: Uses the Boost library for regular expressions which is more powerful than the previously used Posix library.
But Matt and I had offline conversations about this a while back, so that's how I knew something had or was going to change. It was clear JRiver would need to change with the announcement of the Mac and Linux ports, so I had wondered what they were going to use, and asked Matt. There was an initial POSIX library used for the Mac, but I noticed some issues, and I think the plan was all along to use the same library. Boost is very good.
-
MrC, I created a wiki page http://wiki.jriver.com/index.php/Regular_expression_syntax containing info known, for further info to be added as it is discovered.
-
MC19 now uses Boost regular expressions. They should generally be a superset of the previously-used Microsoft TR1 expressions. I haven't done a thorough survey though. Nor have to bothered yet to figure out which Boost flavor are being used.
If someone with source code access can tell me which flavor / variant is being used, that would be useful.
Version 1.54, the same across all platforms.
-
Added it to the wiki, and fixed the spelling of Media Center (this, here's, 'Merica).
-
Version 1.54, the same across all platforms.
Thanks Bob.
Are you passing any flags (e.g. boost::regex::extended or boost::regex::basic) to the constructors to force a particular syntax (or setting these in another means), or is perl (the default) syntax being used?
MrC, I created a wiki page http://wiki.jriver.com/index.php/Regular_expression_syntax containing info known, for further info to be added as it is discovered.
Ok, cool. Please understand that within MC's Regex() function, only one regex flavor is supported; MC users cannot set the flavor flag. It would be easy enough to discover through a few judicious tests, but maybe bob can relay the info easily enough.
I'd do away with the "reported to be" type of statements, and just say what it is. Anything and everything we write is based on what we believe, and until or unless demonstrated otherwise, with good enough authority (Matt, for instance) we can take it as fact. The Wiki shouldn't be a news story with lots of CYA's.
Also, keep in mind who the target audience is - this audience is likely not to care about the list of shortcomings or implementations differences between RE implementations. They are not regex library users. Compatibility failures for implementers (vs. issues for end users of the already-implemented) are not useful here, because MC users cannot set flavor and other flags. It would be better to create your own list with tests and workarounds as you find them between TR1 and Boost as MC employs them.
-
Thanks Bob.
Are you passing any flags (e.g. boost::regex::extended or boost::regex::basic) to the constructors to force a particular syntax (or setting these in another means), or is perl (the default) syntax being used?
Ok, cool. Please understand that within MC's Regex() function, only one regex flavor is supported; MC users cannot set the flavor flag. It would be easy enough to discover through a few judicious tests, but maybe bob can relay the info easily enough.
...
We don't seem to be passing any flags.
-
Ok, great, thank you. We'll assume flavor = perl.
Let's see if chrisjj can devise some tests that demonstrate to his satisfaction the implied flavor.
-
I'd do away with the "reported to be" type of statements, and just say what it is.
I'd love to, but I don't know what it is. If you do, be my guest :)
Also, keep in mind who the target audience is - this audience is likely not to care about the list of shortcomings or implementations differences between RE implementations.
The audience I was keeping in mind does include users interested in the shortcomings and implementation differences.
Compatibility failures for implementers (vs. issues for end users of the already-implemented) are not useful here, because MC users cannot set flavor and other flags.
Such compatibility failures very much affect users, regardless of inability to set flags.
-
Unless you've actually tested MC versions to verify your linked "shortcoming" actually is relevant, the reference is not useful. You've found some link to some guys discussing an issue with a regex REPLACE operation, one that MC does not implement. In other words, that discussion has no relevance in MC at all.
-
Let's see if chrisjj can devise some tests that demonstrate to his satisfaction the implied flavor.
Am I that predictable?? :)
Here's my test expression: regex(+,/#(\Q+\E)#/,1)
On regex Perl syntax, it matches: http://img202.imageshack.us/img202/8463/tmli.png
On regex POSIX syntax, it does not match: http://img839.imageshack.us/img839/1585/ftcf.png
On MC19, it does match: http://img819.imageshack.us/img819/6154/4c0i.png
Since MC19's Boost regexp offers only Perl syntax or POSIX syntax, the above result shows it is Perl syntax.