Find and replace all occurrences of a string within the current paragraph.

I did so much work, and it's my last method to implement.

I want to get the current active doc the current paragraph and replace all occurrences of a string inside this paragraph with another string.

For example, say I have the following paragraph in a document:

«This is a sentence that.» This is another sentence. It is also another sentence. The sentence ".

If the user opens the document containing the paragraph and goes to this paragraph by clicking in any place in there, I want to replace e.g.g "another punishment" with "phrase.

But only in the current active paragraph in the active document.

I found a code with F_ApiFind and F_ApiGetTextRange to get the current text selection, but I can't think of a way to do it.

Post edited by: Efstathios Chatzikyriakidis

Problem solved people. Thank you.

Tags: Adobe FrameMaker

Similar Questions

  • Find and replace all of the odd numbered lines?

    Is their way to search for and replace or delete really, all the odd numbered lines in code view? I have about 12,000 lines of code but you don't need that things on the even lines.

    Thank you very much for the help!

    The odd lines contain random numbers and letters, that's why I can't just find and replace. If they were embedded in a tag, say a 34341 is the way for me to tell dreamweaver to remove all the interval and ? That would solve the problem.

  • Find and replace all caps

    Asked if Framemaker has a global find and replace function cancellation capital letters in sentences. I remember vaguely word being able to do that, but it's been some time that I used Word. I inherited a document in which the author used caps init on almost everything.

    Find/replace is powerful in FrameMaker but doesn't address this specific issue. If you want to stay in FrameMaker remedy, you can either:

    1. Enter the text formatting toolbar to access the case for change (dark red) buttons:

    2. use keyboard shortcuts:

  • Find and replace all layers

    Hi all

    How can I find and change in all layers so hidden layer

    app.findGrepPreferences.findWhat = "\\s\\s+";

    app.changeGrepPreferences.changeTo = "";

    app.changeGrep ();

    app.findGrepPreferences = app.changeGrepPreferences = null;

    Thank you

    Steve

    app.findChangeGrepOptions.includeHiddenLayers = true;
    
  • Find and replace it with an invalid Code in Dreamweaver CC 2015

    I have a HTML file of 800 line with about 200 H3 tags not closed I want to remove. I try to use search / replace, but it doesn't seem to be able to find non closed tags.

    In the excerpt below, I want to remove or delete the H3 tag:

    < /ul >

    < /li >

    < h3 class = "best_SubCategory_Title" id = "455474Title" >

    Best sedan

    < ul class = "ssMatchup_Entries" id = "Matchup455474Entries" >

    < /Li > < li > agreement

    Camry < li > < /li >

    Mazda 6 < /li > < li >

    Passat < li > < /li >

    < /ul >

    I tried different ways, but Dreamweaver search / replace engine can't not find invalid or cavities not blocked tags?

    Here are a few things that I tried, and as you can see, Dreamweaver cannot find the H3 tag:

    Screen Shot 2016-01-21 at 11.18.39 AM.png

    Screen Shot 2016-01-21 at 11.19.47 AM.png

    If I close it manually one of the H3 tags, and then find and replace can find. I think I can use regular expressions to do this, but I need to understand this too, if that's the only way.

    What do you think? Any idea on how to get rid of 200 H3 tags not closed? Perhaps another application?

    Answered my own question, here is the solution:

    For some reason, Dreamweaver cannot find and replace invalid code, or at least it is not easy to do. My problem was that I had a H3 tag not closed and would not replace it. I had to first close the H3 tag, and then I could replace it.

    I did a find and replace the one sought a ">" followed by a lot of white space, like this:

    As my license to close the H3 tag, then I could easily find and replace all now closed H3 tags, like this:

  • Find and replace only the changes in Notepad

    I recently upgraded from RoboHelp 6, RoboHelp 8. In version 6, RoboHelp was configured to open HTML files to find several files, and replace in RoboHelp self rather than another HTML editor. Now that I've updated, when I perform a search using find and replace in files, select a file from the results and then click on the button Edit, the file opens in Notepad. The same thing happens with the computer to a colleague, who has recently upgraded.

    This happens no matter how I configured my OS and RoboHelp. So, for example, it seems not important to know if the following options are selected:
    * Under Tools | Options, Associations, Auto selection Editor tab may be selected, or use the default editor can be selected. This does not change the behavior.
    * Under Tools | Options, Associations, design view < internal > tab can be defined as the default value. Once again, no effect.
    * Under Tools | Options, on the Associations tab, file Associations can have. HTM being edited with RoboHTML.exe. No help there.
    * Under Tools | Options, on the general tab, check to editor HTML system can be selected or not. No luck. Despair is sinking...

    I'm not sure if the operating system settings make a difference, but it is set to open the .htm and .html files in Internet Explorer. It seems that it would not make a difference, however, because clicking on change in RoboHelp find and replace in files does not open the files in Internet Explorer. When you click view, it opens files in Internet Explorer.

    Thank you in advance for your help!

    James Gage, CSC
    The United States State Department

    Welcome to the forum.

    I no longer have access to RH8 but here is what I think happens.

    RH7 presents the multidocument Interface and removed the ability to edit simple themes. Multi file find and replace opens a topic in some tool was selected in Internet Explorer to edit HTML files.

    As HR cannot open a single file, if you do not set IE use HR, you're wasting your time because it cannot do. It must open a project and of IE, it can't do.

  • Find and replace the delimited string value by the

    Hi all

    I have a requirement where I need to find and replace the delimited string values.

    For example, the string is "GL ~ 1001 ~ 157747 ~FEB-13~ CREDIT ~ A ~ N ~ US ~ NULL ~". The 4th column gives the month and year. I need to replace it with the name of the previous month. For example: "GL ~ 1001 ~ 157747 ~JAN-13~ CREDIT ~ A ~ N ~ US ~ NULL ~". I need to do the same thing for the past 12 months.

    I thought initially divide the values and store it in a variable and then after him substituting the value required, join the return.

    I just wanted to know if there is a better way to do it?

    Like this:

    with a model like

    (select "GL ~ 1001 ~ 157747 ~ FEB-13 ~ CREDIT ~ A ~ N ~ $ ~ NULL ~' double UNION ALL data")

    Select ' GL ~ 1001 ~ 157747 ~ JAN-13 ~ CREDIT ~ A ~ N ~ US ~ NULL ~' double data)

    Select

    REPLACE (DATA, TO_CHAR (to_date (substr (data, 16.6), "MON-RRRR"), 'MON - RR'), TO_CHAR (to_date (substr (data, 16.6), "MON-RRRR")-1, 'MON - RR'))

    modeling;

    GL ~ 1001 ~ 157747 ~ JAN-13 ~ CREDITS ~ HAS ~ N ~ US ~ NOTHING ~

    GL ~ 1001 ~ 157747 ~ DEC-12 ~ CREDITS ~ HAS ~ N ~ US ~ NOTHING ~

    Ishan

  • Regex to replace all occurrences of an empty string, except the last

    Hello, everyone!

    I need get to a regular expression to replace all occurrences of an empty string except the last. Right now I'm doing this with this code:
    public static void main(String[] args)
    {
        String str = "abc";
        String regex = "";
        System.out.println(str.replaceAll(regex, "-").replaceFirst("-$", "")); // -a-b-c
    }
    As you can see, to do this, I have to make two calls: one for replaceAll and another for replaceFirst to get rid of the last character. So I would like to get rid of the call to replaceFirst and have the variable of regex as being a regular expression that would be to insert the character along the chain of all but the last. I'm really not very good with regexs, so I ask your help here. The thing I work, but I think it would be more elegant with just a regex to do.

    Thank you in advance.

    Marcos

    Try this:

    String data = "abc";
    System.out.println(data.replaceAll(".", "-$0"));
    
  • How can I find and replace the xml tags?

    Hi, I am using xml in my workflow and want to be able to remove some tags if they contained particular text.

    Here is an example of the xml struct...

    < Entry >

    < name > DEFAULT < / name >

    < such > default < / such >

    DEFAULT < address > < / address >

    < / Entry >

    I use this initial structure to define paragraph styles to follow when you import the xml data.

    This leaves DEFAULT in place everywhere where an entry is not any content of this field.

    I want to be able to import my XML and then run a script that deletes tags that include by DEFAULT, - I need to the xml tag to remove not only the text, if I do a normal find and replace will remove only the text not the tags that is causing problems with style. I also want to remove the end of para/return (^ p) that I placed at the end of the line. So it would be the same opening editor mode and removing content, tags + hard back in there, but I want to automate the process...

    So I think that's what I'm looking for in each case

    "< name > DEFAULT < / name > ^ p.

    and I want to replace it with nothing.

    Is this possible in a script (ideally javascript)?

    I have a little knowledge of javascript, but don't know how to search for and target this kind of string in indesign...

    using indesign cs5

    Thank you very much

    Hello

    Script should do it in two steps:

    1 find all occurrences of that is ' > by DEFAULT.<>

    2 delete the whole paragraph which is a found_text container.

    For example, in this way - JS - (a textFrame filled your text must be selected):

    var mStory = app.selection[0].parentStory;
    app.findTextPreferences =  null;
    app.findTextPreferences.findWhat = ">DEFAULT<";
    var myF = mStory.findText();
    var count = myF.length;
    while (count--)
         myF[count].paragraphs[0].remove();
    

    Rgds

  • The difference between the "Find and replace" in the menu and FindChangeByList.jsx

    Hello! Please help me. Why this work ' find and replace ' (grep), but not working in FindChangeByList.jsx

    find replace
    \r\d (.) \D\d0$ 0

    This procedure find enter, any digit, any digit, any digit and replace all in 0, found.

    Example:

    front after

    7.35

    0

    7.35

    But it does not work in FindChangeByList.jsx (file: FindChangeList.txt):

    grep{findWhat: "\r\d (.)} \D\d"}{changeTo: "0$ 0"}{includeMasterPages:true, includeHiddenLayers:true, includeFootnotes:true, wholeWord:false}

    And it does not work in the present:

    myDocument var = app.documents.item (0);

    app.findGrepPreferences = NothingEnum.nothing;

    app.changeGrepPreferences = NothingEnum.nothing;

    app.findChangeGrepOptions.includeFootnotes = false;

    app.findChangeGrepOptions.includeHiddenLayers = false;

    app.findChangeGrepOptions.includeLockedLayersForFind = false;

    app.findChangeGrepOptions.includeLockedStoriesForFind = false;

    app.findChangeGrepOptions.includeMasterPages = false;

    app.findGrepPreferences.findWhat = \r\d (.) « \D\d » ;

    app.changeGrepPreferences.changeTo = "0$ 0";

    myDocument.changeGrep ();

    Please help me understand. Thank you!

    in findChangeByList you have to escape the string:

    {findWhat : » \d(.) \r\\ \\d\\d"}

  • How can I change a VI that is related to "NI_Excel.lvclass:Excel find and replace (str) .vi

    I need to create a new VI ' Excel find and replace (str) .vi ", for my own needs.

    LabVIEW does not allow me to do, because VI belongs to, "NI_Excel.lvclass."

    Instead of find and replace - I'd like to find him a string and tell me which column and row it is in.

    Thank you

    Have you tried to do this, even the jury of Exceldiscussion forums?

    You'll probably find what you want, or close at least something you could learn from.

    Can you open the VI you want to change?  Even if you are not allowed to copy, if you open it and see what it does, you can the recode yourself using the appropriate ActiveX functions.

  • Find and replace

    Hi all

    One of my colleague working on a program with more than 100 cases of the same enum (without type def as a constant knot, of control and property).  It must update the enum (surprise), so he needs to make the change on all the enum 100 +.  I showed him how to do a type-def, and he could replace the 100 + with new enum type FED.  It's a lot of work manually, so I tried to use search and replace, but it won't let me choose the new enum type-def we want to replace the enum 100 + with.  If I do find and replace, I can exclude the property node?  If I, the field node would get linke for the new enum?

    What is the best way to accomplish this task?

    jyang72211 wrote:

    1. I was able to find all the constant enum and replace them with something else.  Is it true that I can replace only with similar data type?  For example, I can't replace a constant enum with an add function.  I tried to change the enum to the ring to digital and numeric Enum.  They worked, but sometimes there is a glitch, where I have to find me and replace twice to make it work.  Have you seen this before?

    Yes, there are replacements that don't work because they are not simply doesn't make sense.

    2. I was able to easily find the enum constant, but for controls of the enum, I needed to go under others-> terminal façade.  I found the controls, but there is a slash sign beside him.  I assumed that meant cannot be operated.  I tried to replace the enum with some other control, and I can't.  How do you do search and replace on a control of enum (not constant).

    The search and replace has some limitations, and you met a. You can do what you want to do by the script. See attached example, which replaces the controls that have a label that starts with 'cc' with the typedef. The criteria for which controls replace yours. I just chose that according the example VI that you have provided. Modify if needed.

  • Find and replace variables

    Hello world

    Setup

    I have a line that connects two cycles in two different VI.

    The vi share the queue by a reference.

    Now that I changed the format of the queue of the enum element to a cluster of enum and date

    my queue reference has changed as well.

    Question

    How to replace (rebind) all variable instances of variables of refnum "old_queue" with "new_queue" refnum queue queued?

    What I tried

    I tried to use 'Find and replace' but it doesn't let me do: in text mode, it displays an icon crossed close to all

    He found bodies, and in graphic mode, that is not has such an option, as substitute a variable refnum.

    First: a lesson for next time. Check the data type of the queue a typedef. Now, the problem goes away. Change the typedef and all references.

    Lesson for next time bonus do not transmit queue around references. It is not necessary. Queues can be appointed. For another reference to the same queue, all what you need to know is its name.

    To answer your basic question, you can't. You'll just have to follow the wires around and replace them manually.

    Mike...

  • Ideas: I get the 0x80073AFC error code when I try to use the system restore then, how can I find and replace this file missing MUI?

    Remember - this is a public forum so never post private information such as numbers of mail or telephone!

    Ideas: I get the 0x80073AFC error code when I try to use the system restore then, how can I find and replace this file missing MUI?

    • I am running Windows 7 for packs SP 1 or SP 2 does NOT solve my problem since neither one works with Windows 7.  Is there a way to search for this MUI (Multiple User Interface) missing file? The every thing must have himself installed in the first place. I took my mom (she died in June) and my brother on this PC as users so even if they do not use this PC supports multiple users. Maybe if I deleted as a reboot and additional users it will solve my problems. My updates install OK but I can't run at all system restore. It creates a restoration point OK but when I try to sr back to a restore point before I get the error 0x80073AFC topic of the missing MUI file. Then, when I spear SR it is said that he could not and no files have been changed because of the error 0x8000FFFF error, unspecified catastrophic failure and could not retrieve the file several times when system restore is attempted.

      I'm running Windows 7 on a HP Pavilion with browser Firefox 3.6.8 browser Opera 10.60, IE8 and Google Chrome 5.0.375.125 browser browser.

      Can you tell me what I try next? Thnks a lot and sayonara for now the guy-Jack McElwee / keimanzero the Scion of the Anime in Brookhaven PA - USA

      OK I tried everything and nothing works! Only added beginners are updated browser Opera 10.63; IE9 (Beta); Firefox 3.6.12 and Google Chrome 7.0.517.41 and Java 22. Of course like everyone else in the world, I had to uninstall/enable and disable/download again and reinstall new Adobe Flash 10 and 11 of the shock wave and they keep crashing too! Hello 4 keep screwing browsers and now I get connection network problems. I run Comcast doctor and did everything it said to do, but nothing works. Oh and I added 7-Zip and WinZip also. Likewise, they will not work! Help! Thanks - K & K

    keimanzero,

    Comcast of Norton Security Suite version is installed? If Yes, who and perhaps malware is most likely to cause questions you have published, in particular the failure of the restoration of the system.
    First, configure the system to boot - How to solve a problem by performing a boot in Windows Vista or in Windows 7
    NOTE: Start-up mode minimum state all the 3rd party firewalls will be disabled. Open Control Panel > Windows Firewall to make sure that the native firewall of Windows 7 is now on.

    Download and Save the update system (or CheckSUR) tool. You will need to download the specific Version of CheckSUR corresponding to the architecture of the system to Windows 7. If you do not know the architecture of the system, and then click the link that says "Click here to show or hide the instructions step by step with images" under method 2: download the update directly system preparation tool from Microsoft Download Center .
    Description of the preparation tool system update for Windows Vista for Windows Server 2008, for Windows 7 and for Windows Server 2008 R2

    Once the download is complete, close all open programs and browsers. Now, run CheckSUR with the system connected to the internet because it will download the .cab for system files. Reboot once CheckSUR is complete.

    Secondly, I suggest that you run the File Checker system while in the same clean boot state.
    To run the System File Checker tool, follow these steps:

    1. Click Start and type cmd in the field search programs and files .
    2. Right click on cmd.exe in the programs of list, and then choose 'run as administrator '.
      If you are prompted for an administrator password or a confirmation, type your password or click on continue.
    3. At the command prompt, enter the following line exactly as written including the space between thec and the/and then press ENTER:
      sfc/scannow

    When the analysis is complete, test to see if the problems facing the system have been resolved.

    If they are not, you will need to contact Norton support for the version of Norton Internet Security Comcast to get help, or just uninstall NIS, run the Norton removal tool (right click Norton_Removal_Tool.exe, choose "Run as Administrator"), reboot and then check to see if the problems are still occurring.

    Expert MowGreen Windows IT Pro - consumer safety

  • Find and replace function in file names?

    Is it possible to do a find and replace in the names of files, rather than the office or similar?  I have a large list of names of files that all have a problem with them I want to replace, but I don't want to pass by and do each manually!  A better way to do it?

    Rob

    Hello exoticdisease,

    Thanks for posting on the Microsoft answers Forum.

    Select the files in Windows Explorer, press and hold Shift and right click on them. Choose copy from the menu in the path. Paste the list in any editor you prefer. You get the full path for each file, but a simple find/replace will clean up if necessary.

    I don't know if it of what you're looking for or not.

    If please reply and let us know if this solves your problem or if you need further assistance.

    Marilyn
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

Maybe you are looking for