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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:05:00+00:00 2026-05-27T23:05:00+00:00

Is there a way to specify regex that would match a string but from

  • 0

Is there a way to specify regex that would match a string but from a certain position in this string? What I mean is that I have line:

"Somebodys_value is % value"  

and I’d like to check if my regex matches this sentence but only after % sign.

  • 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-27T23:05:01+00:00Added an answer on May 27, 2026 at 11:05 pm

    Using only RegEx you just include the % in your pattern. If your pattern is value, you can change it to %.*value.


    Another way, that’s more dependent on your engine, is to provide an offset. You can use a strpos like function to find the %, and say to start matching after that.


    Yet another method is to copy everything after the % into a new buffer/string, and then try to match that.


    Any more specifics depend on the engine you’re using.

    edit:
    It sounds like you don’t want the % in your matches. A few implementation specific ways to do this are…

    • (?:%).*value where the % is in a non-capturing group
    • %\K.*value where \K discards everything before it (limited support)
    • %(.*value) where you will just use the first subpattern (often called $1).
    • or you can just do any operations starting at sub 1, and ignore the % at sub 0.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to specify a mysql query that does something like this
Is there a way to specify a child's initial window position in Qt? I
Is there a way to specify a Model in Django such that is ensures
Is there any way to specify that a function should be called when a
is there a way to specify the angle when using $(this).animate({'left': '+=30px'}, 1000); I
Is there a way using NSRegularExpression to specify that you want to do a
Is there a way to specify a regular expression to match every 2nd occurrence
Is there a way to specify that one of 2 attributes is required in
Is there a way to specify to ignore specific text? For example I have
Is there a way to specify type while parsing Json, so that the conversion

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.