Rex match a string in JS

I have few set of strings as mentioned below

/v4/users/1
/v4/users/1/vehicles/1
/v4/users
/v4/users?page=1

I would like to get users in all four cases as output using regex in Javascript

I tried below in https://www.regextester.com/

(?<=/v4/).*.(?=/[^/]*/)

It doesn’t seem to come up right.
Any help on this would be appreciated.

98 thoughts on “Rex match a string in JS”

  1. I’m really enjoying the design and layout of your website.
    It’s a very easy on the eyes which makes it much more pleasant for me to come here and visit more often.
    Did you hire out a designer to create your theme?
    Outstanding work!

    Reply
  2. Hello! I understand this is somewhat off-topic but I had to
    ask. Does building a well-established website like yours take a large amount of work?

    I am brand new to operating a blog however I do write in my journal daily.
    I’d like to start a blog so I can share my
    experience and thoughts online. Please let me know
    if you have any kind of suggestions or tips for brand new aspiring blog owners.
    Appreciate it!

    Reply
  3. With havin so much written content do you ever run into any issues of plagorism or
    copyright infringement? My site has a lot of completely unique content I’ve
    either authored myself or outsourced but it appears a
    lot of it is popping it up all over the internet without my permission. Do you know any techniques to help
    protect against content from being stolen? I’d really appreciate it.

    Reply
  4. Hi there! I could have sworn I’ve been to this site before
    but after going through some of the articles I realized it’s new to
    me. Anyways, I’m certainly happy I came across it and I’ll
    be bookmarking it and checking back regularly!

    Reply
  5. I’m curious to find out what blog system you’re utilizing?
    I’m having some minor security issues with my latest website and I’d like to find something more secure.
    Do you have any recommendations?

    Reply
  6. Thank you for the good writeup. It in fact was a amusement account
    it. Look advanced to more added agreeable from you!
    By the way, how can we communicate?

    Reply
  7. We stumbled over here different web page
    and thought I may as well check things out.
    I like what I see so i am just following you. Look forward to looking
    over your web page yet again.

    Reply
  8. This design is steller! You obviously know how to keep
    a reader entertained. Between your wit and your videos, I was almost
    moved to start my own blog (well, almost…HaHa!) Great job.
    I really loved what you had to say, and more than that, how you presented it.
    Too cool!

    Reply
  9. I don’t know if it’s just me or if everyone else encountering
    issues with your site. It looks like some of the written text in your content
    are running off the screen. Can somebody else please provide feedback and let me know
    if this is happening to them too? This could be a issue with my web browser because I’ve had this happen previously.
    Cheers

    Reply
  10. I know this if off topic but I’m looking into
    starting my own weblog and was curious what all is required to
    get set up? I’m assuming having a blog like yours would cost a
    pretty penny? I’m not very internet smart so I’m not 100% sure.
    Any suggestions or advice would be greatly appreciated.
    Thank you

    Reply
  11. Hey there! This is kind of off topic but I need some advice from an established blog.
    Is it very difficult to set up your own blog?
    I’m not very techincal but I can figure things out pretty fast.
    I’m thinking about setting up my own but I’m not sure where to begin. Do
    you have any points or suggestions? Thanks

    Reply
  12. What i do not understood is in fact how you are not really a lot more neatly-appreciated than you might be right now.
    You’re so intelligent. You already know therefore considerably in relation to this matter, produced me in my view imagine it from a lot of various
    angles. Its like men and women are not involved except it is one thing
    to accomplish with Lady gaga! Your own stuffs nice.
    At all times deal with it up!

    Reply
  13. First off I want to say terrific blog! I had a quick question that I’d like to
    ask if you do not mind. I was interested to find out how you center yourself and clear your thoughts before writing.
    I’ve had a tough time clearing my thoughts in getting my thoughts out there.
    I truly do take pleasure in writing but it just seems like the first 10 to 15 minutes are generally lost just trying to figure out how to begin.
    Any ideas or hints? Cheers!

    Reply
  14. It is the best time to make some plans for the future and it’s time to be
    happy. I’ve read this post and if I could I wish to suggest you some interesting
    things or tips. Perhaps you could write next articles referring
    to this article. I desire to read even more things about it!

    Reply
  15. Greetings from Idaho! I’m bored to tears at work so I decided
    to browse your site on my iphone during lunch break. I really like the knowledge you present here and can’t wait to take a look when I get home.
    I’m amazed at how fast your blog loaded on my cell phone ..

    I’m not even using WIFI, just 3G .. Anyways, good blog!

    Reply
  16. Heya i’m for the first time here. I came across this board and I find It really useful & it helped me out a lot.

    I hope to give something back and aid others like you helped me.

    Reply

Leave a Comment