Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Replace & find only selected text in do file?

    Hello-- New user transitioning to Stata. In a do file, is there a way to constrain the Replace & find feature to just the selected text? Or a way to do the replacing in a constrained section of a do file?

  • #2
    Yes, at least in the Windows version.

    1. Select the text where you want to do the replacement,

    2. Ctrl h,

    3. tick the checkbox at the bottom of the menu "Replace all in selection",

    4. fill in the target characters and their replacements and

    5. press the "Replace all" button (or Alt a).

    Comment


    • #3
      Thanks. I should have specified I'm using macOS. Joseph Coveney when you use Ctrl h on Windows, does it bring up the find/replace toolbar in your do window? If yes, then I guess the mac version doesn't have that checkbox.
      I'd send a screenshot of what I see on my macOS version, but I guess the Statalist FAQ says I can't (?).
      Last edited by Brian Soriano; 27 Mar 2023, 22:19.

      Comment


      • #4
        Originally posted by Brian Soriano View Post
        . . . when you use Ctrl h on Windows, does it bring up the find/replace toolbar in your do window?
        Yes.

        I'd send a screenshot of what I see on my macOS version, but I guess the Statalist FAQ says I can't (?).
        The forum's software will allow users to upload at least Portable Network Graphics (.png) formatted image files, and so if your operating system allows you to save the screenshot in that format, then you can upload it.

        Comment

        Working...
        X