#include <Basics_DirUtils.hxx>
#include <Basics_Utils.hxx>
-#include <regex>
#include <cstdlib> // getenv, system
#include <boost/filesystem.hpp>
+#include <boost/regex.hpp>
namespace boofs = boost::filesystem;
#ifdef WIN32
{
{// round1
enum { SCHEME = 2, AUTHORITY = 4, PATH = 5 }; // sub-strings
- std::regex urlRegex ( R"(^(([^:\/?#]+):)?(//([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?)",
- std::regex::extended );
- std::smatch matchResult;
+ boost::regex urlRegex ( R"(^(([^:\/?#]+):)?(//([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?)",
+ boost::regex::extended );
+ boost::smatch matchResult;
libraryFile._isURL = false;
- if ( std::regex_match( libraryFile._name, matchResult, urlRegex ))
+ if ( boost::regex_match( libraryFile._name, matchResult, urlRegex ))
libraryFile._isURL = ( !matchResult.str( SCHEME ).empty() &&
!matchResult.str( AUTHORITY ).empty() &&
!matchResult.str( PATH ).empty() );
return true;
{// round2
enum { HOST = 2, PORT = 3, PATH = 4 }; // sub-strings
- std::regex urlRegex ( R"(^(([^:\/?#]+):)?([^/]+)?(/[^#]*))",
- std::regex::extended );
- std::smatch matchResult;
+ boost::regex urlRegex ( R"(^(([^:\/?#]+):)?([^/]+)?(/[^#]*))",
+ boost::regex::extended );
+ boost::smatch matchResult;
libraryFile._isURL = false;
- if ( std::regex_match( libraryFile._name, matchResult, urlRegex ))
+ if ( boost::regex_match( libraryFile._name, matchResult, urlRegex ))
libraryFile._isURL = ( !matchResult.str( HOST ).empty() &&
!matchResult.str( PORT ).empty() &&
!matchResult.str( PATH ).empty() );