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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:16:30+00:00 2026-05-27T10:16:30+00:00

why does this regex fail to match: (?<=Title = 8:)[^]*(?=) this: ARPHELPTELEPHONE = 8:

  • 0

why does this regex fail to match:

(?<="Title" = "8:)[^"]*(?=")

this:

"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:"
"Title" = "8:something"
"Subject" = "8:"
"ARPCONTACT" = "8:something"
"Keywords" = "8:"

Its in excerpt from a visual studio setup project. It matches in the online tool i’m using but it doesn’t match using Regex.Match()

Here’s the code:

var productTitleRegex = @"(?<=""Title"" = ""8:)[^""]*(?="")";
var titleMatch = Regex.Match(content, productTitleRegex);

titleMatch.Success if false and value returns nothing

EDIT:

Maybe I’m just missing something when using Look ahead and look behind in .net regex? Because if I remove the lookarounds, this works but it matches the whole line, which I don’t want. So I used lookarounds to just match the value I want.

Anyone else had a similar experience when using lookarounds in .net regex?

  • 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-27T10:16:30+00:00Added an answer on May 27, 2026 at 10:16 am

    I tested your regex pattern with C# in VS2008, it found a match with “something” as value. looks like it is working fine. I also tested it with free tool downloaded from http://www.radsoftware.com.au/regexdesigner/

    enter image description here

    However It won’t work if your using RegEX with RegexOptions “IgnorePatternWhitespace”

        var productTitleRegex = @"(?<=""Title"" = ""8:)[^""]*(?="")";
        var titleMatch = Regex.Match(content, productTitleRegex, RegexOptions.IgnorePatternWhitespace);
    

    in this case you won’t get any match

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

Sidebar

Related Questions

^[^\x00-\x1F\x7F-\xFF]+$ This regex will properly fail to match a string that contains non-printing (hex
/[^\\]\]/ What does this regex match to? Trying to match ] somehow. I am
what does this regex match? How can I use this regex in C? I
Do you have any idea why this regex does not match the code below?
Please could someone explain to me why this regex does not match anything, when
In regards to this: http://stackoverflow.uservoice.com/pages/general/suggestions/103227-parser-does-not-match-all-valid-urls is this regex adequate or will it need to
Does this look like it should work? I'm wanting to generate directions from one
What does this mean exactly? I'm doing something like this: File.Copy(@\\foo\bar\baz.txt, @c:\test\baz.txt); MSDN doesn't
What does this option do? It is accessible from the Build menu.
Why does the second statement fail? works Regex.Replace(zz WHERE zz, where, yy, RegexOptions.IgnoreCase |

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.