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

  • Home
  • SEARCH
  • 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 6164603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:01:24+00:00 2026-05-23T22:01:24+00:00

Is there such a thing? I’ve been looking around the Vala API and the

  • 0

Is there such a thing? I’ve been looking around the Vala API and the Regex object seems to have no support for capturing groups so that I can reference them later. Is there currently any way to get around this apparent limitation? Say I’m parsing a string out of a group of strings (the contents of a file) for a given pattern like:

parameter = value

But I want the syntax to be lax so that it could also say

 parameter=value

or

parameter =   value

etc… The first idea that springs to mind is using regular expressions with capturing groups but there seems to be no support for this feature as a part of Vala right now, as far as I can see.

The only alternative I can come up with is splitting the string with a regular expression that matches whitespace so that I end up with an array I can analyze, but then again the file might not contain only “parameter = value”-like formatted lines.

  • 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-23T22:01:25+00:00Added an answer on May 23, 2026 at 10:01 pm

    It goes something like this. Disclaimer, this is off the top of my head:

    Regex r = /^\s*(?P<parameter>.*)\s*=\s*(?P<value>.*)\s*$/;
    MatchInfo info;
    if(r.match(the_string, 0, out info)) {
        var parameter = info.fetch_named("parameter");
        var value = info.fetch_named("value");
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there such a thing? Can anyone kindly elucidate on this? I have been
Is there such a thing?! So for eample, on my image load I have
Is there such a thing as a Cron API? I mean, is there a
Is there such a thing that finds numbers using regex and can perform simple
Is there such a thing as a listener in Ruby? I know they have
Is there such a thing as a thing that returns an IEnumerable<object> or IEnumerable<T>
There's such thing as __w64 in Visual C++ 9. I came across it while
Is there such a thing as an x86 assembler that I can call through
Is there such a thing as having the most prefered design pattern for building
Is there such a thing as unit test generation? If so... ...does it work

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.