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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:00:51+00:00 2026-05-28T17:00:51+00:00

When replacing code on various documents, sometimes we face hard times, having to do

  • 0

When replacing code on various documents, sometimes we face hard times, having to do it manually. This happens because the built-in ‘find and replace’ tools on development envoirnments are usually really simple and not programmable.

For example, if I have the following:

Jack's jeans is blue
Jack's hat is blue
Ron's T-shirt is blue
Ron's hat is grey

For some reason, I may want to change that to this:

Jack's jeans is red
Jack's hat is red
Ron's T-shirt is blue
Ron's hat is grey

I would like to know if there is some tool to specify something like “change every ‘blue’ to ‘red’ WHERE there is the word ‘Jack’ on the line”, because if I just say to the program “hey, change all ‘blue’ to ‘red'”, then Ron’s T-shirt will be red too, and I don’t want that to happen.

Hope you guys understand what I need

  • 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-28T17:00:52+00:00Added an answer on May 28, 2026 at 5:00 pm

    You just have to use your tools in a smarter way. In the find and replace, use regex mode, give appropriate regex ( something that would look for Jack in the same line) and change blue to red. Visual Studio and any IDE / Text Editor can do it.

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

Sidebar

Related Questions

I've got this snippet of code that I will be replacing in various places
I am cleaning up some of our network-code and while replacing various integer types
Got the following code: $(document).ready(function() { $('a.add-item').click(function() { if ($(this).parent().find('input').attr('value', '0')) { $(this).parent().find('input').attr('value', '1')
I'm having a weird problem. I have this code $topic contains 海賊_(ONE_PIECE) from URI
I want a string replacing code i have a string like this <strong>WHAT IS
I need some comparing and replacing code in PHP Our mission is to empower
Here is my code for finding a sequence in a string and replacing it
Should I still be using tables anyway? The table code I'd be replacing is:
Replacing the Special Character using Perl while i am doing this . I got
Consider the following code: function Dog() { this.foo = function() {}; this.walk = function()

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.