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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T02:38:02+00:00 2026-05-17T02:38:02+00:00

I am trying to extract a section of text that looks something like this:

  • 0

I am trying to extract a section of text that looks something like this:

Thing 2A blah blah Thing 2A blah blah Thing 3

Where the “3” above could actually be ANY single digit. The code I have that doesn’t work is:

((Thing\s2A).+?(Thing\s\d))

Since the 3 could be any single digit, I cannot simply replace the “\d” with “3”. I tried the following code, but it doesn’t work either:

((Thing\s2A).+?(Thing\s\d[^A]))

Please help!

  • 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-17T02:38:03+00:00Added an answer on May 17, 2026 at 2:38 am

    Is this what you’re trying to do?

    ((Thing\s2A).+?(Thing\s[0-9]))

    Edit: Oh I get it, you want a digit not followed by an A. Use a forward lookahead

    ((Thing\s2A).+?(Thing\s[0-9](?!A))

    That’s assuming you want it not followed by an A. Replace the A with whatever you DON’T want to follow the digit

    ((Thing\s2A).+?(Thing\s[0-9](?![A-Za-Z]))

    Or if you know what you expect after the digit, you can add it. For example

    ((Thing\s2A).+?(Thing\s[0-9][\s$])

    That will match Thing 3 followed by a space, tab, or a newline

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

Sidebar

Related Questions

Trying to extract strings that are wrapped in double brackets. For example [[this is
I need a regexp to match something like this, 'text' | 'text' | ...
Im trying to extract a YouTube link from just random text. e.g. This is
I am trying to extract the page name from a complex url. This post
I'm trying to extract all of the links to image files from a text
I'm trying to implement this basic example found here : under the section titled
I'm trying to extract the number from a text string and join it to
Im trying to extract some fields from the output at the end of this
I have a string where im trying to extract a specic section of words
Trying to extract files to a given folder ignoring the path in the zipfile

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.