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

Browse by Tags

All Tags » backreference
Showing page 1 of 2 (17 total posts)
  • Transform backreference to uppercase in OpenOffice.org Calc Find Replace

    Here are some sample cells: Brake Pad Hl Db01 Pad For Hl-280 Disc Pair Brake Pad Shimano Br-M755 Metal Disc Pad M03  Here is what I want them to become: Brake Pad Hl Db01 Pad For HL-280 Disc Pair Brake Pad Shimano BR-M755 Metal Disc Pad M03   Here is what I've got so far in my Find & Replace ...
    Posted to Construction Advice (Forum) by SimonDorfman on October 5, 2011
  • Regex to fetch previous 2 lines of the match.

    Hi all    I am working on some search portal and heaviliy based on regexes.  Here my need is - I have some search term.Based on location on that search term in the input String , I pick next 2 lines and previous 2 lines . Total five lines i append to string builder =prev 2 +line that includes search term +next 2 ...
    Posted to Construction Advice (Forum) by Misha79 on February 28, 2011
  • Replace substring1 with substring2 only when substring1 has non-whitespace border characters

    I am performing a grep find and replace in my text editor TextWrangler on a very large CSV data file. I have a source string of hello??world ??goodnight?? moon?? wake up and would like to replace the ?? substring with -- ONLY when it is bounded by non-whitespace characters on both sides, yielding a target string of hello--world ??goodnight?? ...
    Posted to Construction Advice (Forum) by samuelClemens87 on September 24, 2010
  • Changing patterns depending on structure within substring

    Hi regex experts, I’m searching for a regular expression for PHP’s preg_replace() in order to adjust concatenated strings (no multi-line). These strings are fragments in German which form a sentence and therefore need to be (automatically) edited to adhere to grammar conventions. Roughly speaking, the regular expression should ...
    Posted to Construction Advice (Forum) by casualcoder on March 20, 2010
  • Incidentally matching backreference instead of the intended digit

    Software Environment:Renamer4Mac, TextWrangler (both using grep with perl-compatible regex as their backend) Given String:My File 1.txt Regex search "Find a single digit prepended by a non-digit..." ([^\d])(\d{1}) Regex replace "...and prepend with it with a leading zero": \10\2 Expected result:My File 01.txt Effective ...
    Posted to Construction Advice (Forum) by porg on May 3, 2009
  • Password Validation Pattern

    Hello, I need help! I got this password validation expression (?=.{6,})(?=(.*\d){1,})(?=(.*\W){1,}) and should add additional "rule". The rules in this expression are: the pwd has to be at least 6 chars long, contain at least one digit and contain at least one special character. The "rule" or expression I should add, should ...
    Posted to Construction Advice (Forum) by wesen on January 15, 2009
  • Re: Multiple letter Word

    Sorry for not mentioning the programming language.  I am using PHP.    But the above examples still do not specifically match strings that have three consecutive letters, instead they just see if there are three letters in that string and then print that string if therer is a match.    Again, what would be the regex ...
    Posted to Construction Advice (Forum) by lazukars on September 3, 2008
  • Anomaly Filtering

    Hello, this is my first post so bear with me. I made a quick search through the forum and found nothing, so any feedback is appreciated. Recently I have been studying spam using regular expressions in a mail proxy called SpamPal to cleanly divide each message into folders that best describe their characteristics. I feel I grasp the basics of the ...
    Posted to Construction Advice (Forum) by Synq on March 15, 2008
  • Back Reference Overwrites Changes

    I ran into an interesting situation where back references overwrite previous changes in a regular expression. I needed a regular expression that updated a pattern but also checked for something that comes before the pattern.  It should leave everything before the pattern as it was before the updates.  There can be multiple matches of ...
    Posted to Construction Advice (Forum) by AProgrammer on November 20, 2007
  • Meta-regex to find fixed length of regex match (XSLT)

    In the context of the regex dialect of XSLT 2.0, I am looking for two "meta-regexes" that analyse other regexes. Each is discussed in a part of its own. (Part 1 posted as: Meta-regex for variable-length matching regexes (XSLT)) Part 2 Aim: A regex that provides for pre-calculating the length of the match that a fixed-length matching ...
    Posted to Construction Advice (Forum) by yvesforkl on October 2, 2007
1 2 Next >