Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 813425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T01:21:26+00:00 2026-05-15T01:21:26+00:00

So I have a regex expression to parse certain parts of a file name.

  • 0

So I have a regex expression to parse certain parts of a file name. I’m trying to store each part in its own vector until I use it later, but it won’t let me. One error I get when I try making a vector of System::String^ is that error C3698: 'System::String ^' : cannot use this type as argument of 'new' Then, when I try just making a vector of std::string, it can’t implicitly convert to type System::String^, and casting won’t work either.

void parseData()
{
    System::String^ pattern = "(\\D+)(\\d+)(\\w{1})(\\d+)\\.(\\D{3})";
    std::vector < System::String^ > x, y, filename, separator;

    Regex re( pattern );

    for ( int i = 0; i < openFileDialog1->FileNames->Length; i++ )
    {
        Match^ m = re.Match( openFileDialog1->FileNames[i] );
        filename.push_back( m->Groups[0]->Value );/*
        x.push_back( m->Groups[1]->Value );
        separator.push_back( m->Groups[2]->Value );
        y.push_back( m->Groups[3]->Value );*/
    }                       
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T01:21:27+00:00Added an answer on May 15, 2026 at 1:21 am

    You could use the STL/CLR library if you really prefer using STL collections. It isn’t exactly popular, this web page shows you why.

    Use List<String^>

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a regex expression that I'm doing a split against another string and
I have deleted all <a href=></a> tags in my blog with this regex expression:
I have these variables: boost::regex re //regular expression to use std::string stringToChange //replace this
I have a problem with a difficult regex. I have this expression to detect
I Have a text file and want to parse it with PHP any one
I am trying to create a .NET Regex to parse a CSS font declaration,
I am trying to write a regex that will allow me to parse CSV
I have the following regular expression, which lets me parse percentages like '20%+', '20%',
Most website I can parse its title easily with RegEx (. ) or \s
I am trying to parse some text using boost. i have looked at the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.