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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T23:35:20+00:00 2026-05-28T23:35:20+00:00

How do I extract the program name from a string. The string will look

  • 0

How do I extract the “program name” from a string. The string will look like this :

% O0033(SUB RAD MSD 50R III) G91G1X-6.4Z-2.F500 G3I6.4Z-8. G3I6.4
G3R3.2X6.4F500 G91G0Z5. G91G1X-10.4 G3I10.4 G3R5.2X10.4 G90G0Z2.
M99 %

The program name is (SUB RAD MSD 50R III). Storing the result in another string is fine. I’m learning powershell so any explaination of your answers will be appreciated.

  • 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-28T23:35:21+00:00Added an answer on May 28, 2026 at 11:35 pm

    The following regex extract anything between the parenthesis:

    PS> $prog = [regex]::match($s,'\(([^\)]+)\)').Groups[1].Value
    PS> $prog
    SUB RAD MSD 50R III
    

    Explanation (created with RegexBuddy)

    Match the character '(' literally «\(»
    Match the regular expression below and capture its match into backreference number 1 «([^\)]+)»
       Match any character that is NOT a ) character «[^\)]+»
          Between one and unlimited times, as many times as possible, giving back as needed (greedy) «+»
    Match the character ')' literally «\)»
    

    Further Reading:

    • Regular-Expressions.info
    • Regular Expressions Are Your Friend (Part 1)
    • Regular Expressions Are Your Friend (Part 2)
    • Regular Expressions Are Your Friend (Part 3)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

given this xml file, i would like to extract the data out from it.
My program needs to do 2 things. Extract stuff from a webpage. Do stuff
Extract the number after #/ from my string: abcdefg#/123 .
I extract the audio from a bunch of flv files as an MP3. This
I've written a C program to extract files from a tar archive using libarchive.
I need to read an XML formatted document from a C program and extract
My program reads device paths like /dev/rdisk0 from input and then it looks in
I would like to extract the coordinates (latitude, longitude) and some properties like name
I'm writing a Python program to extract data from the middle of a 6
In a C program, I have a file path in a string (specifically, this

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.