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

The Archive Base Latest Questions

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

Here is the example SF_Library/example/Platform/Analyses-PLATFORM.part0.xml SF_Library/example/Platform/Models-PLATFORM.part0.xml SF_Library/example/Platform/Models-PLATFORM.car SF_Library/example/Platform/DS-PLATFORM.car I want to grab base path

  • 0

Here is the example

SF_Library/example/Platform/Analyses-PLATFORM.part0.xml
SF_Library/example/Platform/Models-PLATFORM.part0.xml
SF_Library/example/Platform/Models-PLATFORM.car
SF_Library/example/Platform/DS-PLATFORM.car

I want to grab base path which is following.

SF_Library/example/Platform/

Anybody know what regex should i use for it?

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

    Regexes ain’t for extracting substrings. Why not use the dirname command?

    $ dirname /home/foo/whatever.txt
    /home/foo
    $
    

    If you need it in a variable:

    DIRECTORY=`basename "SF_Library/example/Platform/DS-PLATFORM.car"`
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following XML file: <?xml version=1.0?> <!DOCTYPE library SYSTEM library.dtd> <library xmlns=http://example.com/a
I saw similar examples here. But it just doesn't work for me. I want
Im trying to hammer togehter a WYSIWYG-edit in c# following some examples from here
Seatgeek has a zoomable draggable tiled interface. An example is here: http://seatgeek.com/sf-bulls-yankees-tickets/3-2-2012-tampa-george-steinbrenner-field/mlb/785875/# I want
I've been following the examples on similar posts, but to no avail. Here is
I would like to know, which of the following examples is the best for
OK, first, I dont want any kind of flamewar here or anything like it.
I've looked at other examples here, but they seem to be replacing the contents
I tried one of the examples here to load the content in the div,
I read the MSDN documentation and examples here and I know that the correct

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.