Thread: search and replace regular expressions

  1. #1
    Registered User
    Join Date
    Jan 2007
    Posts
    330

    search and replace regular expressions

    Does anyone know how I can use regular expressions in Visual Studio's search and replace to find every line which contains the words "xxx" AND "yyy" ?

  2. #2
    Registered User
    Join Date
    Jan 2010
    Posts
    412
    Regular Expressions (Visual Studio)

    If xxx always comes before yyy you can use
    Code:
    <xxx>.*<yyy>
    If the words can appear in either order use
    Code:
    {<xxx>.*<yyy>}|{<yyy>.*<xxx>}

  3. #3
    Registered User
    Join Date
    Jan 2007
    Posts
    330
    thanks!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C# Regular Expressions
    By pobri19 in forum C# Programming
    Replies: 0
    Last Post: 07-18-2010, 08:13 PM
  2. Regular expressions
    By JimpsEd in forum C Programming
    Replies: 5
    Last Post: 05-13-2006, 06:01 PM
  3. Regular expressions
    By jverkoey in forum A Brief History of Cprogramming.com
    Replies: 9
    Last Post: 01-23-2005, 09:36 PM
  4. Regular Expressions
    By Korn1699 in forum C# Programming
    Replies: 4
    Last Post: 01-12-2005, 12:50 AM
  5. Regular Expressions again
    By Inquirer in forum C++ Programming
    Replies: 2
    Last Post: 04-19-2002, 10:03 PM