--- a/tools/loaders/sharq/regexpr.hpp
+++ b/tools/loaders/sharq/regexpr.hpp
@@ -11,6 +11,7 @@
 #include <iostream>
 
 #include <re2/re2.h>
+#include <re2/stringpiece.h>
 
 class CRegExprMatcher
 /// Encapsulation for RE2 regexpr matcher
@@ -50,9 +51,9 @@ public:
      * @return true if defline matches
      * @return false if defline does not match
      */
-    bool Matches(const std::string_view& input)
+    bool Matches(const re2::StringPiece& input)
     {
-        mLastInput = input;
+        mLastInput.assign(input.data(), input.size());
         return re2::RE2::PartialMatchN(input, *re, args.empty() ? nullptr : &args[0], (int)args.size());
     }
 
--- a/test/loaders/sharq/test-regexpr.cpp
+++ b/test/loaders/sharq/test-regexpr.cpp
@@ -60,17 +60,17 @@ TEST_CASE(YesMatch)
     CRegExprMatcher m( R"([@>+]([!-~]*?)[: ]?([!-~]+?Basecall)(_[12]D[_0]*?|_Alignment[_0]*?|_Barcoding[_0]*?|)(_twodirections|_2d|-2D|_template|-1D|_complement|-complement|\.1C|\.1T|\.2D|)[: ]([!-~]*?)[: ]?([!-~ ]+?_ch)_?(\d+)(_read|_file)_?(\d+)(_strand\d*.fast5|_strand\d*.*|)(\s+|$))" );
     REQUIRE( m.Matches( "@f286a4e1-fb27-4ee7-adb8-60c863e55dbb_Basecall_Alignment_template MINICOL235_20170120_FN__MN16250_sequencing_throughput_ONLL3135_25304_ch143_read16010_strand" ) );
     REQUIRE_EQ( size_t( 11 ), m.GetMatch().size() );
-    REQUIRE_EQ( string(""), m.GetMatch()[0].as_string() );
-    REQUIRE_EQ( string("f286a4e1-fb27-4ee7-adb8-60c863e55dbb_Basecall"), m.GetMatch()[1].as_string() );
-    REQUIRE_EQ( string("_Alignment"), m.GetMatch()[2].as_string() );
-    REQUIRE_EQ( string("_template"), m.GetMatch()[3].as_string() );
-    REQUIRE_EQ( string(""), m.GetMatch()[4].as_string() );
-    REQUIRE_EQ( string("MINICOL235_20170120_FN__MN16250_sequencing_throughput_ONLL3135_25304_ch"), m.GetMatch()[5].as_string() );
-    REQUIRE_EQ( string("143"), m.GetMatch()[6].as_string() );
-    REQUIRE_EQ( string("_read"), m.GetMatch()[7].as_string() );
-    REQUIRE_EQ( string("16010"), m.GetMatch()[8].as_string() );
-    REQUIRE_EQ( string("_strand"), m.GetMatch()[9].as_string() );
-    REQUIRE_EQ( string(""), m.GetMatch()[10].as_string() );
+    REQUIRE_EQ( re2::StringPiece(""), m.GetMatch()[0] );
+    REQUIRE_EQ( re2::StringPiece("f286a4e1-fb27-4ee7-adb8-60c863e55dbb_Basecall"), m.GetMatch()[1] );
+    REQUIRE_EQ( re2::StringPiece("_Alignment"), m.GetMatch()[2] );
+    REQUIRE_EQ( re2::StringPiece("_template"), m.GetMatch()[3] );
+    REQUIRE_EQ( re2::StringPiece(""), m.GetMatch()[4] );
+    REQUIRE_EQ( re2::StringPiece("MINICOL235_20170120_FN__MN16250_sequencing_throughput_ONLL3135_25304_ch"), m.GetMatch()[5] );
+    REQUIRE_EQ( re2::StringPiece("143"), m.GetMatch()[6] );
+    REQUIRE_EQ( re2::StringPiece("_read"), m.GetMatch()[7] );
+    REQUIRE_EQ( re2::StringPiece("16010"), m.GetMatch()[8] );
+    REQUIRE_EQ( re2::StringPiece("_strand"), m.GetMatch()[9] );
+    REQUIRE_EQ( re2::StringPiece(""), m.GetMatch()[10] );
 }
 
 int main (int argc, char *argv [])
--- a/tools/loaders/sharq/fastq_defline_matcher.hpp
+++ b/tools/loaders/sharq/fastq_defline_matcher.hpp
@@ -59,7 +59,7 @@ public:
      * @return true if defline matches
      * @return false if defline does not match
      */
-    virtual bool Matches(const string_view& defline)
+    virtual bool Matches(const re2::StringPiece& defline)
     {
         return re.Matches(defline);
     }
@@ -99,7 +99,7 @@ public:
     {
     }
 
-    bool Matches(const string_view& defline) override {return false;}
+    bool Matches(const re2::StringPiece& defline) override {return false;}
     virtual void GetMatch(CFastqRead& read) override  {}
     virtual uint8_t GetPlatform() const override { return 0;}
 
@@ -167,16 +167,16 @@ public:
     {
         string spot;
         if (!re.GetMatch()[0].empty()) {
-            re.GetMatch()[0].CopyToString(&spot);
+            spot.assign(re.GetMatch()[0].data(), re.GetMatch()[0].size());
             spot.append(1, (re.GetMatch()[1][0] == '_') ? ':' : re.GetMatch()[1][0]);
         }
-        re.GetMatch()[2].AppendToString(&spot); //lane
+        spot.append(re.GetMatch()[2].data(), re.GetMatch()[2].size()); //lane
         spot.append(1, (re.GetMatch()[3][0] == '_') ? ':' : re.GetMatch()[3][0]);
-        re.GetMatch()[4].AppendToString(&spot); //tile
+        spot.append(re.GetMatch()[4].data(), re.GetMatch()[4].size()); //tile
         spot.append(1, (re.GetMatch()[5][0] == '_') ? ':' : re.GetMatch()[5][0]);
-        re.GetMatch()[6].AppendToString(&spot); //x
+        spot.append(re.GetMatch()[6].data(), re.GetMatch()[6].size()); //x
         spot.append(1, (re.GetMatch()[7][0] == '_') ? ':' : re.GetMatch()[7][0]);
-        re.GetMatch()[8].AppendToString(&spot); //y
+        spot.append(re.GetMatch()[8].data(), re.GetMatch()[8].size()); //y
         read.SetSpot(spot);
 
         read.SetReadNum(re.GetMatch()[10]);
@@ -229,7 +229,7 @@ public:
     virtual void GetMatch(CFastqRead& read) override
     {
         CDefLineMatcherIlluminaNewBase::GetMatch(read);
-        const string m9 = re.GetMatch()[9].as_string();
+        const auto &m9 = re.GetMatch()[9];
         if ( m9.size() > 2 ) {
             if ( mSuffixPattern.Matches( m9 ) ) {
                 read.SetSuffix( mSuffixPattern.GetMatch()[2] );
@@ -296,14 +296,14 @@ public:
 
         // flowcell, lane, column, row, readNo, spotGroup, readNum, endSep
         string spot;
-        re.GetMatch()[0].AppendToString(&spot); //flowcell
-        re.GetMatch()[1].AppendToString(&spot); //lane
-        re.GetMatch()[2].AppendToString(&spot); //column
-        re.GetMatch()[3].AppendToString(&spot); //row
-        re.GetMatch()[4].AppendToString(&spot); // readNo
+        spot.append(re.GetMatch()[0].data(), re.GetMatch()[0].size()); //flowcell
+        spot.append(re.GetMatch()[1].data(), re.GetMatch()[1].size()); //lane
+        spot.append(re.GetMatch()[2].data(), re.GetMatch()[2].size()); //column
+        spot.append(re.GetMatch()[3].data(), re.GetMatch()[3].size()); //row
+        spot.append(re.GetMatch()[4].data(), re.GetMatch()[4].size()); // readNo
         read.SetSpot(spot);
 
-        if (!re.GetMatch()[6].empty() && re.GetMatch()[6].starts_with("/"))
+        if (!re.GetMatch()[6].empty() && re.GetMatch()[6][0] == '/')
             re.GetMatch()[6].remove_prefix(1);
         read.SetReadNum(re.GetMatch()[6]);
 
@@ -333,11 +333,11 @@ public:
         //  0         1     2       3    4       5       6     7        8           9         10         11
         //  flowcell, lane, column, row, readNo, suffix, sep1, readNum, filterRead, reserved, spotGroup, endSep
         string spot;
-        re.GetMatch()[0].AppendToString(&spot); //flowcell
-        re.GetMatch()[1].AppendToString(&spot); //lane
-        re.GetMatch()[2].AppendToString(&spot); //column
-        re.GetMatch()[3].AppendToString(&spot); //row
-        re.GetMatch()[4].AppendToString(&spot); // readNo
+        spot.append(re.GetMatch()[0].data(), re.GetMatch()[0].size()); //flowcell
+        spot.append(re.GetMatch()[1].data(), re.GetMatch()[1].size()); //lane
+        spot.append(re.GetMatch()[2].data(), re.GetMatch()[2].size()); //column
+        spot.append(re.GetMatch()[3].data(), re.GetMatch()[3].size()); //row
+        spot.append(re.GetMatch()[4].data(), re.GetMatch()[4].size()); // readNo
         read.SetSpot(spot);
 
         read.SetSuffix(re.GetMatch()[5]);
@@ -406,7 +406,9 @@ public:
                 const string Barcode = "barcode";
                 if ( barcode.find( Barcode ) == 0 )
                 {   // self.spotGroup = re.sub(r'barcode(\d+)$',r'BC\1',self.spotGroup,1)
-                    read.SetSpotGroup( string( "BC" ) + barcode.substr( Barcode.size() ).as_string() );
+                    read.SetSpotGroup( string( "BC" )
+				       + string(barcode.data() + Barcode.size(),
+						barcode.size() - Barcode.size()) );
                 }
                 else
                 {
@@ -495,19 +497,19 @@ public:
         string spot;
         if ( !re.GetMatch()[3].empty() )
         {   // self.name = poreStart + self.channel + poreMid + self.readNo + poreEnd
-            re.GetMatch()[0].AppendToString(&spot); //poreStart
-            re.GetMatch()[1].AppendToString(&spot); //channel
-            re.GetMatch()[2].AppendToString(&spot); //poreMid
-            re.GetMatch()[3].AppendToString(&spot); //readNo
-            re.GetMatch()[4].AppendToString(&spot); //poreEnd
+            spot.append(re.GetMatch()[0].data(), re.GetMatch()[0].size()); //poreStart
+            spot.append(re.GetMatch()[1].data(), re.GetMatch()[1].size()); //channel
+            spot.append(re.GetMatch()[2].data(), re.GetMatch()[2].size()); //poreMid
+            spot.append(re.GetMatch()[3].data(), re.GetMatch()[3].size()); //readNo
+            spot.append(re.GetMatch()[4].data(), re.GetMatch()[4].size()); //poreEnd
 
             read.SetNanoporeReadNo( re.GetMatch()[3] );
         }
         else
         {   // self.name = poreStart + self.channel + poreEnd
-            re.GetMatch()[0].AppendToString(&spot); //poreStart
-            re.GetMatch()[1].AppendToString(&spot); //channel
-            re.GetMatch()[4].AppendToString(&spot); //poreEnd
+            spot.append(re.GetMatch()[0].data(), re.GetMatch()[0].size()); //poreStart
+            spot.append(re.GetMatch()[1].data(), re.GetMatch()[1].size()); //channel
+            spot.append(re.GetMatch()[4].data(), re.GetMatch()[4].size()); //poreEnd
 
             if ( getPoreReadNo2.Matches(re.GetLastInput()) )
             {
@@ -520,7 +522,7 @@ public:
 
         poreMid = re.GetMatch()[2];
         poreRead = re.GetMatch()[5];
-        re.GetMatch()[6].AppendToString( &poreFile );
+        poreFile.append(re.GetMatch()[6].data(), re.GetMatch()[6].size());
         PostProcess( read );
     }
 
@@ -578,11 +580,11 @@ public:
 
         poreMid = re.GetMatch()[7];
         //self.poreFile = poreStart + self.channel + poreMid + self.readNo + poreEnd
-        re.GetMatch()[5].AppendToString( &poreFile ); //poreStart
-        re.GetMatch()[6].AppendToString( &poreFile ); //channel
-        re.GetMatch()[7].AppendToString( &poreFile ); //poreMid
-        re.GetMatch()[8].AppendToString( &poreFile ); //readNo
-        re.GetMatch()[9].AppendToString( &poreFile ); //poreEnd
+        poreFile.append(re.GetMatch()[5].data(), re.GetMatch()[5].size()); //poreStart
+        poreFile.append(re.GetMatch()[6].data(), re.GetMatch()[6].size()); //channel
+        poreFile.append(re.GetMatch()[7].data(), re.GetMatch()[7].size()); //poreMid
+        poreFile.append(re.GetMatch()[8].data(), re.GetMatch()[8].size()); //readNo
+        poreFile.append(re.GetMatch()[9].data(), re.GetMatch()[9].size()); //poreEnd
 
         poreRead = re.GetMatch()[3];
         PostProcess( read );
@@ -622,11 +624,11 @@ public:
 
         poreMid = re.GetMatch()[7];
         // poreFile = poreStart + self.readNo + poreMid + self.channel + poreEnd
-        re.GetMatch()[5].AppendToString( &poreFile ); //poreStart
-        re.GetMatch()[6].AppendToString( &poreFile ); //readNo
-        re.GetMatch()[7].AppendToString( &poreFile ); //poreMid
-        re.GetMatch()[8].AppendToString( &poreFile ); //channel
-        re.GetMatch()[9].AppendToString( &poreFile ); //poreEnd
+        poreFile.append(re.GetMatch()[5].data(), re.GetMatch()[5].size()); //poreStart
+        poreFile.append(re.GetMatch()[6].data(), re.GetMatch()[6].size()); //readNo
+        poreFile.append(re.GetMatch()[7].data(), re.GetMatch()[7].size()); //poreMid
+        poreFile.append(re.GetMatch()[8].data(), re.GetMatch()[8].size()); //channel
+        poreFile.append(re.GetMatch()[9].data(), re.GetMatch()[9].size()); //poreEnd
 
         poreRead = re.GetMatch()[3];
         PostProcess( read );
@@ -663,7 +665,7 @@ public:
 
         const string Unclassified = string("unclassified");
         if ( getPoreBarcode.Matches(re.GetLastInput()) &&
-             getPoreBarcode.GetMatch()[0].as_string() != Unclassified )
+             getPoreBarcode.GetMatch()[0] != Unclassified )
         {
             read.SetSpotGroup( getPoreBarcode.GetMatch()[0] );
         }
--- a/tools/loaders/sharq/fastq_read.hpp
+++ b/tools/loaders/sharq/fastq_read.hpp
@@ -58,21 +58,21 @@ public:
 
     void SetLineNumber(size_t line_number) { mLineNumber = line_number;}
     void SetSpot(const string& spot) { mSpot = spot; }
-    void SetSpot(const re2::StringPiece& spot) {  spot.CopyToString(&mSpot); }
+    void SetSpot(const re2::StringPiece& spot) {  mSpot.assign(spot.data(), spot.size()); }
 
     void SetReadNum(const string& readNum) { mReadNum = readNum; }
-    void SetReadNum(const re2::StringPiece& readNum) { readNum.CopyToString(&mReadNum); }
+    void SetReadNum(const re2::StringPiece& readNum) { mReadNum.assign(readNum.data(), readNum.size()); }
 
     void SetSuffix(const string& suffix) { mSuffix = suffix; }
-    void SetSuffix(const re2::StringPiece& suffix) { suffix.CopyToString(&mSuffix); }
+    void SetSuffix(const re2::StringPiece& suffix) { mSuffix.assign(suffix.data(), suffix.size()); }
 
     void SetSpotGroup(const string& spotGroup);
     void SetSpotGroup(const re2::StringPiece& spotGroup);
 
     void SetReadFilter(uint8_t readFilter) { mReadFilter = readFilter; }
 
-    void SetChannel(const re2::StringPiece& channel) { channel.CopyToString(&mChannel); }
-    void SetNanoporeReadNo(const re2::StringPiece& readNo) { readNo.CopyToString(&mNanoporeReadNo); }
+    void SetChannel(const re2::StringPiece& channel) { mChannel.assign(channel.data(), channel.size()); }
+    void SetNanoporeReadNo(const re2::StringPiece& readNo) { mNanoporeReadNo.assign(readNo.data(), readNo.size()); }
 
 
 private:
@@ -193,7 +193,7 @@ void CFastqRead::SetSpotGroup(const re2:
     if (spotGroup == "0")
         mSpotGroup.clear();
     else
-        spotGroup.CopyToString(&mSpotGroup);
+        mSpotGroup.assign(spotGroup.data(), spotGroup.size());
 }
 
 
--- a/tools/loaders/sharq/fastq_defline_parser.hpp
+++ b/tools/loaders/sharq/fastq_defline_parser.hpp
@@ -55,7 +55,7 @@ public:
      * @return true if defline can be parsed
      * @return false if defline cannot be parsed
      */
-    bool Match(const string_view& defline, bool strict = false);
+    bool Match(const re2::StringPiece& defline, bool strict = false);
 
     /**
      * @brief Enable MatchAll pattern
@@ -128,7 +128,7 @@ void CDefLineParser::Reset()
     mIndexLastSuccessfulMatch = 0;
 }
 
-bool CDefLineParser::Match(const string_view& defline, bool strict)
+bool CDefLineParser::Match(const re2::StringPiece& defline, bool strict)
 {
     if (mDefLineMatchers[mIndexLastSuccessfulMatch]->Matches(defline)) {
         return true;
@@ -153,7 +153,7 @@ bool CDefLineParser::Match(const string_
 
 void CDefLineParser::Parse(const string_view& defline, CFastqRead& read)
 {
-    if (Match(defline)) {
+    if (Match(re2::StringPiece(defline.data(), defline.size()))) {
         mDefLineMatchers[mIndexLastSuccessfulMatch]->GetMatch(read);
         return;
     }
--- a/tools/loaders/sharq/fastq_parser.hpp
+++ b/tools/loaders/sharq/fastq_parser.hpp
@@ -457,7 +457,7 @@ bool fastq_reader::parse_read(CFastqRead
                 GET_LINE(*m_stream, m_line, m_line_view, m_line_number);
                 if (m_line_view.empty())
                     break;
-                if (m_line_view[0] == '@' && m_defline_parser.Match(m_line_view, true)) {
+                if (m_line_view[0] == '@' && m_defline_parser.Match(re2::StringPiece(m_line_view.data(), m_line_view.size()), true)) {
                     m_buffered_defline = m_line;
                     break;
                 }
--- a/tools/loaders/sharq/CMakeLists.txt
+++ b/tools/loaders/sharq/CMakeLists.txt
@@ -82,7 +82,7 @@ set(RE2_TAG 2021-09-01)
 #    -DCMAKE_INSTALL_MESSAGE:STRING=LAZY
 #
 #)
-set(RE2_STATIC_LIBRARIES -lre2 )
+set(RE2_STATIC_LIBRARIES -lre2 -labsl_string_view)
 
 #file(COPY ${CMAKE_SOURCE_DIR}/tools/sharq/sharq.py  DESTINATION ${BINDIR})
 
--- a/test/loaders/sharq/CMakeLists.txt
+++ b/test/loaders/sharq/CMakeLists.txt
@@ -37,7 +37,7 @@ if( SINGLE_CONFIG )
         set(LOCAL_BUILD_DIR ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY})
         set(LOCAL_INCDIR ${LOCAL_BUILD_DIR}/include)
         set(LOCAL_LIBDIR ${LOCAL_BUILD_DIR}/lib)
-        set(RE2_STATIC_LIBRARIES -lre2 )
+        set(RE2_STATIC_LIBRARIES -lre2 -labsl_string_view)
 
         if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
             set(CXX_FILESYSTEM_LIBRARIES "stdc++fs")
