Got more questions? Find advice on: ASP | SQL | XML | Windows
in Search
Welcome to RegexAdvice Sign in | Join | Help

Browse by Tags

All Tags » lookaround
  • Just matching in the middle of a string

    Hello,   I am trying to write a regex to match just with B2 and B3   String content = "aaaaaB1aaaaaXaaaaaB2aaaaaB3aaaaZaaaB4aaaa";   String regex = "(B[\\d]{1}?);    //this group matches with all B1, B2, B3 and B4  I would need to delimit the matching between the 'X' and the ...
    Posted to Construction Advice (Forum) by matias.blasi on January 27, 2010
  • Help me in writing regular expression

    I have a requirement where I have to fetch prefix in a text excluding right hand side digit pattern. For ex: AB9T0005 should give me only AB9T AB9T-K1A-0005 should give me only AB9T-K1A- What I mean is prefix may include any input including numbers and other alpha numeric values. With out using regular expression I will parse from right ...
    Posted to Construction Advice (Forum) by chambarish on June 17, 2009
  • Find first previous string NOT all previous occurances

    In the following string: <div class="x" bla bla bla <div class="x" bla bla bla <div class="x" bla bla bla EXAMPLE STRING  I want to match: <div class="x" bla bla bla EXAMPLE STRING NOT <div class="x" bla bla bla <div class="x" bla bla bla <div ...
    Posted to Construction Advice (Forum) by LarryEitel on June 9, 2007
  • Re: parsing html, sort of have it but stuck

    You should take a better look at your $parsed array. Your capturing subgroup (.*?) already puts what you need in there. foreach ($parsed as $val) {     echo "Entire match: " . $val[0] . "\n";     echo "Captured group 1: " . $val[1] . "\n"; } You might want to get ...
    Posted to Construction Advice (Forum) by eSquire on May 8, 2007
  • Cannot get lookahead and lookbehind to work

    Hello, I wonder if you can help me, this is driving me crazy! I have a large text file and I want to find a term in it. But... I only want the regex to be successful if this term is NOT encompassed by square brackets. e.g. this is the search term:    sp_W_rev_CreditClient_RMAItems I do not want this to be ...
    Posted to Construction Advice (Forum) by Major Problem on May 2, 2007
  • use regex to exclude substring

    Hi, I have an application with Java component, and C++ component with BOOST library.  Both are using regular expressions (regular expression class in Java SE and regular expression in BOOST library) to match incoming strings.  I am wondering if it is possible to add exclusion into the existing regular expression?  that is, ...
    Posted to Construction Advice (Forum) by likong on April 13, 2007
  • Need Expression to test if all groups of words can be found (lookaround help?)

    Hi, I'm trying to build a single RegEx that can test for the existence of at least one word from each group of words. It is part of a search function, where a user specifies two words, say 'cats' and 'dogs'.   I am creating variations of the words (e.g. cat and dog) and I then want to check if a string has the ...
    Posted to Construction Advice (Forum) by Alergy on March 15, 2007