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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:43:11+00:00 2026-06-14T09:43:11+00:00

params[:svn_path] is returning an URL like this http://svn.repos.mywebsite.com/testingtitle.documents Now I need to get only

  • 0

params[:svn_path] is returning an URL like this

http://svn.repos.mywebsite.com/testingtitle.documents

Now I need to get only the last part of the url that is testingtitle.

How to we get it?

Thanks in advance

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

    You can use Uri module of ruby

    uri = URI.parse("http://svn.repos.mywebsite.com/testingtitle.documents")
    
    path = uri.path #"/testingtitle.documents"
    path_with_no_slash = path.gsub("/", "") #"testingtitle.documents"
    array = path_with_no_slash.split(".") #["testingtitle", "documents"]
    result = array[0] #"testingtitle"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know that CakePHP params easily extracts values from an URL like this one:
I have an external subversion repository, which is empty now. Let's call it http://www.example.com/svn
I want to have params like this: program dothis --additional --options and: program dothat
I use params in my controller like this: class ProductsController < ApplicationController def create
I have been tinkering with drag and drop in Google Closure libraries: http://closure-library.googlecode.com/svn/docs/class_goog_fx_DragDropGroup.html I
given this: if (params[:to].to_s =~ (/^r\+.*@site.com$/)) == nil How can I make site.com dynamic
params.max = Math.min(params.max ? params.int('max') : 2, 100) orders=OrderInfo.createCriteria().listDistinct() For pagination, we need to
Auto-binding of request params seems like default behaviour, but I can't find a lot
I have these where params, but it's not returning what is desired: WHERE `Profiles`.`Departure1`
Using this standard code: NSMutableDictionary *params = [NSMutableDictionary dictionary]; [params setObject:image forKey:@photo]; [params setObject:text

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.