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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T05:25:07+00:00 2026-06-02T05:25:07+00:00

I’m trying to find out a way to match the following test string: token

  • 0

I’m trying to find out a way to match the following test string:

token = '1866FB352F4DF76BCB92C3482DB7D7B4F562';

The data I want returned is…

1866FB352F4DF76BCB92C3482DB7D7B4F562

I’ve tried the following, the closes I have is this, but it’s including the single quote at the end:

(?!token = ')(\w+)';

Now, another one, which works closely, but it’s including the last single quote:

'([^']+)'

Anyone want to take a stab at this?

Update: After looking at what I need to parse, I found the same value in the html, in the form area, which looks like it might be easier to grab:

name="token" value="482CD1FE037F68D5A36F4C961A6D57D9"

Again, I just need the contents within value=”*”

However, the regex will have to parse the entire html source, so I assume I will need to search for name=”toke” value= but not include that in the result set.

  • 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-02T05:25:09+00:00Added an answer on June 2, 2026 at 5:25 am

    If your regex engine supports lookaround, you can use

    (?<=')\w+(?=')   
    

    This matches an alphanumeric word if it’s surrounded by single quotes, without making those quotes a part of the actual match. If you only want to match hexadecimal numbers, use

    (?i)(?<=')[0-9A-F]+(?=')   
    

    EDIT:

    Since you have now added that you’re using JMeter, and because JMeter doesn’t support lookbehind assertions for reasons incomprehensible to me (because Java itself does support it just fine), you can possibly cheat like this:

    \b[0-9A-F]+(?=')
    

    only checks whether an entire hex number occurs right before a ' character. It does not check for the presence of an opening quote, but chances are that this won’t matter.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I want to construct a data frame in an Rcpp function, but when I
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I would like to count the length of a string with PHP. The string

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.