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 8839121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T10:10:09+00:00 2026-06-14T10:10:09+00:00

How can I extract someXml ? frame 0 push ‘this’ getVariable push ‘g_data_1343488’ push

  • 0

How can I extract someXml ?

frame 0
    push 'this'
    getVariable
    push 'g_data_1343488'
    push ' 

    someXml'

    setMember
end // of frame 0

I’m trying to use RegEx but i’m unsuccessful with it :

foreach (var match in Regex.Matches(file, @"(?<=push ').*(?=')"))

Problem with this one : I don’t want to have for exemple ‘g_data_1343488’ or ‘this’ to be grabbed.

  • 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-06-14T10:10:10+00:00Added an answer on June 14, 2026 at 10:10 am

    Here is one possibility. It is a regex that tries to recognize the contents between the single quotes as XML. It’s not a perfect regex for this. It really depends on your requirements if it is ok to use. The more accurate the regex has to be, the more difficult it becomes to read. As it is, this expression will not match all XML and will match some invalid XML as well.

    For example this regex will match tags with names that start with numbers. It would also match XML closing tags with attributes. You could tweak it depending on your needs.

    Here it is:

    push\s+'\s*<(\w+)(?:\s+\w+=(?:"[^"]*"|'[^']*'))*>(?:[^<]+|(?!</\1>)</?\w+(?:\s+\w+=(?:"[^"]*"|'[^']*'))*\s*/?>)*</\1>\s*'
    

    Here is a breakdown of the expression. The start of the push statement:

    push\s+'\s*
    

    Detect the root XML tag and capture its name. Allow for attributes that are single and double quote delimited.:

    <(\w+)(?:\s+\w+=(?:"[^"]*"|'[^']*'))*>
    

    Loop through all the inner tags and text elements inside the root tag. Allow for attributes that are single and double quote delimited.

    (?:[^<]+|(?!</\1>)</?\w+(?:\s+\w+=(?:"[^"]*"|'[^']*'))*\s*/?>)*
    

    Capture the closing root tag.

    </\1>\s*'
    

    You could also try simply capturing the push commands and run their values through a function like in this solution:
    How to check for valid xml in string input before calling .LoadXml()

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

Sidebar

Related Questions

How can we extract a line from a multiLine EditText ? I tried this
I know that I can use following command to extract a single file to
I am trying to follow this example but I can't understand this part: Imagine
In perl regex we can extract the matched variables, ex below. # extract hours,
Are there any APIs that can extract moods from a string (for use in
With YouTube URLs such as (1) I can extract the videoID (in this case,
I am trying to write a regular expression that can extract (possibly multiple) strings
I have a time format like this t = 2012-03-20T08:31:00-05:00 I can extract the
How I can extract {{template|{{template2}}|other params}} from this string if we just know template:
I am trying to extract data from xml file that looks like this (see

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.