Need help to find and replace grep using Xml tags!

Hello world

I have a Textframe with value ($ 00.00) between two xml tags. a tag for "$" and another for a value (00 h 00).

Now I find these value (00 h 00) and change value (24.10). If I run the script, removing the price tag XML and updated price.

My expectation is the value of these update without deleting the XML tag.

Please suggest me where I made the mistake in the code. Please find the code and screenshot for your reference.

Before running the Script: After running the Script:                                                                                                             

Screen Shot 2016-09-17 at 5.03.18 pm.pngScreen Shot 2016-09-17 at 5.09.31 pm.png

Code:

var flgGREP="[$]\\d+[.]\\d+"
var Price="$24.10"
myLine=app.selection[0];
FindReplaceValue(flgGREP,Price,myLine);
function FindReplaceValue(findValue,replaceValue,Sapps){
    app.findGrepPreferences = app.changeGrepPreferences = null;  
    app.findGrepPreferences.findWhat = findValue;  
    app.changeGrepPreferences.changeTo = replaceValue;
    Sapps.changeGrep(); 
}

-yajiv

This is because the XML (opening and closing of the representations) tag is a special character but a generic.

So the above grep model fails because you have a text like [TAG] $[TAG] [TAG] 00.00 [TAG] is not picked up by the grep engine.

However there is not (unless I'm wrong) a metacharacter which could identify the brands of tags. You can do this in text F/R, but of course it is not as smooth as grep.

Bad news is that these special characters are not saved if you F/R on a labeled content (I mean in the above case).

Good luck for you is that you seem to know the markupTag that host the price = copy_frame so I'd domething like:

var root = app.activeDocument.xmlElements[0];
var copy_frame_tags = root.evaluateXPathExpression (".//copy_frame" );
var tag;

while ( tag = copy_frame_tags.pop() ) {
     tag.contents=="00.00" && tag.contents="24.10";
}

HTH

Loïc

Ozalto | Productivity-oriented - Loïc Aigon

Tags: InDesign

Similar Questions

  • Need help to find and replace

    Hi all

    I need assistance to find and replace words between \ make "BOLD" and delete the symbol in my pages just like below.

    Text example:

    He astonished his parents by \turning a childhood obsession\ in a decent-paying career, much to their dismay.

    After the text:
    He astonished his parents by turning a childhood obsession into a decent-paying career, much to their dismay.

    Thanks in advance,

    Siva

    (\\+?) will never return more than 1 backslash because the? is telling to find the shortest match. {I would change that to each (\) or (\\{2)}

  • Need help to find and replace multiple query

    Hello

    Is it possible to run multiple searches and replace queries both in Dreamweaver 8?

    Currently I have:

    Find: current Document
    Search: Source Code
    Find: ToR
    Title: < acronym 'Mandate' = > ToR < / acronym >
    Options: Match case and find whole words

    I have search and replace about 12 acronyms on each page, and I was wondering if I can create a search and replace the query that includes all my acronyms or do I have to manually run these 12 single queries every time?

    Thanks for the help!

    I'm afraid that is both

    --
    Paul Whitham
    Certified Professional Dreamweaver MX2004
    Adobe Community Expert - Dreamweaver

    Valleybiz Web design
    www.valleybiz.NET

    "Acadieman" wrote in message
    News:eci6a5$JDL$1@forums. Macromedia.com...
    > Hi,.
    >
    > Is it possible to run multiple searches and replace queries both in
    > Dreamweaver 8?
    >
    > Currently I have:
    >
    > Search in: current Document
    > Search for: Source Code
    > Find: ToR
    > Replace: ToR
    > Options: match case and find whole words
    >
    > I find and replace about 12 acronyms on each page and I was
    > I was wondering if I can create a search and replace the query that would include
    > all my
    > acronyms or I have to manually run these 12 single queries every time?
    >
    > Thanks for the help!
    >

  • Urgent need help with find and change / GREP

    I'm working on a manual that contains more than a thousand paintings. I'm not quite familiar with GREP and need help to determine the right to coding/jokers to change the character style to a group of words/numbers on a global basis.

    For example, in Chapter 7, a paragraph style is applied to this line of text:

    TABLE 7.1: T4, T3, FREE T4 AND FREE T4ED

    I need to change "table 7.1:" for a character style and so of suite/so on up to "Table 7,150:"-while leaving the other numbers on the same line unchanged also.»» Is it possible to do without having to manually each table style number?

    gd247 wrote:

    I'm working on a manual that contains more than a thousand paintings. I'm not quite familiar with GREP and need help to determine the right to coding/jokers to change the character style to a group of words/numbers on a global basis.

    For example, in Chapter 7, a paragraph style is applied to this line of text:

    TABLE 7.1: T4, T3, FREE T4 AND FREE T4ED

    I need to change "table 7.1:" for a character style and so of suite/so on up to "Table 7,150:"-while leaving the other numbers on the same line unchanged also.»» Is it possible to do without having to manually each table style number?

    No need for GREP. If "TABLE 7.1:" is text, you can create a nested character style that extends through the colon, in the paragraph style. "

    If "TABLE 7.1:" is created by a numbered list of automatic type paragraph style, you can specify a character style named for the part of automatic numbering in the drop-down menu Style of character, in the Style of numbering of the chips section and numbering of the dialog box Options of paragraph style. If the character style does not exist, you can stay in the operation of paragraph options by choosing 'New Style of character' in the menu. After you create the new style, you're back in the process of definition of the paragraph.

    HTH

    Kind regards

    Peter

    _______________________

    Peter gold

    Know-how ProServices

  • Need help to find and install the game Chess Titans Windows Vista for XP

    Need help to find and install the game Chess Titans Windows Vista for XP

    Hi SBOYDC130guy,

    We will not be able to install titan of failures on windows XP because it is designed for Windows Vista and Windows 7 and it's built-in game.

    With regard to:

    Samhrutha G S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Help to find and replace. Please

    I imported a text where there are in italic content original, but when put in IDCS4 italic text appears as _italic words_. It is under the Roman name with _ of the characters who surround him. Is it possible to find and replace. Needless to say that the text between the _s varies.

    I would like to try a find/change GREP searching (_) ([^ _] +) (_) and replace them with $2 all change to italic formatting (preferably in a character style).  This translates to seek a _, then everything that is not a _, followed of another _ and replace it with the content between the two. You can also use (_) (. +?) (_) that match the srting more runs between two characters _ in the same way (except it does not cross a paragraph break), but it will run a little slower.

    Credit for this should go to Peter Kahrel and his excellent introduction GREP...

  • Need help to retrieve the value of an xml tag.

    Hi all

    Hello all, I have problem to extract a value from an xml tag. I created an xml schema based on the schema, I created an xmltype table and inserted a value to the table. When I try to extract a value of a particular tag I can't do... Kindly help me to solve this problem. Here by I write all working, I did...

    I use the following client:
    -----------------------------------

    SQL * more: Release 10.2.0.1.0 - Production on Mon 31 Jan 11:44: 59 2011

    Copyright (c) 1982, 2005, Oracle. All rights reserved.


    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With partitioning, OLAP and Data Mining options


    ////////////////////////////////// XML Schema ///////////////////////

    Start
    () dbms_xmlschema.registerSchema
    "http://www.oradev.com/chipsxml.xsd,"
    ' < scheme xmlns = "http://www.w3.org/2001/XMLSchema".
    targetNamespace = "http://www.oradev.com/chipsxml.xsd."
    xmlns:SAMP = "http://www.oradev.com/chipsxml.xsd".
    version = "1.0" >

    < feature name = 'Field1' >
    < complexType >
    <>sequence
    < element name = "UTI" >
    < complexType >
    <>sequence
    < element name = "U01" type = "string" / >
    < element name = "U02" type = "string" / >
    < element name = "U03" type = "string" / >
    < element name = "U03a" type = "string" / >
    < element name = "U03b" type = "string" / >
    < element name = "U03c" type = "string" / >
    < element name = "U04" type = "string" / >
    < element name = "U05" type = "string" / >
    < / sequence >
    < / complexType >
    < / item >
    < / sequence >
    < / complexType >
    < / item >
    < / schema > ',
    (TRUE, TRUE, FALSE, FALSE);
    end;


    A table that has several column.

    CREATE TABLE chipsxmltable1)
    Identification number, XMLDATA XmlType)
    XMLTYPE XMLDATA STORE AS OBJECT / RELATIONAL
    XMLSCHEMA 'http://www.oradev.com/chipsxml.xsd '.
    ELEMENT 'field1 ';


    Insert the query in chipsxmltable.

    INSERT INTO (VALUES) chipsxmltable
    XmlType.CreateXml ("<?") XML version = "1.0"? >
    < xmlns:samp samp: field1 = "http://www.oradev.com/chipsxml.xsd" >
    < USE >
    No. < U01 > < / U01 >
    Y < U02 > < / U02 >
    Y < U03 > < / U03 >
    < U03a > Y < / U03a >
    < U03b > Y < / U03b >
    < U03c > Y < / U03c >
    Y < U04 > < / U04 >
    Y < U05 > < / U05 >
    < / UTI >
    ((< / samp: field1 > '));


    To display the data in a field with the structure:
    --------------------------------------------

    1. motion:
    ----------
    Select * from chipsxmltable1;

    Output:
    -------


    ID XMLDATA
    ---------- -----------------------------------------------------------------
    1 <? XML version = "1.0"? >
    < xmlns:samp samp: field1 = "http://www.oradev.com/chipsxml.xsd" >
    < USE >
    No. < U01 > < / U01 >
    No. < U02 > < / U02 >
    Y < U03 > < / U03 >
    < U03a > Y < / U03a >
    < U03b > Y < / U03b >
    < U03c > Y < / U03c >
    Y < U04 > < / U04 >
    Y < U05 > < / U05 >
    < / UTI >
    < / samp: field1 >


    2 query: (both the query shows the same result)
    ----------

    SELECT X.xmldata.getClobVal ('XMLDATA' FROM chipsxmltable1 X);

    Select extract (XMLDATA, "/ Field1'") .getstringval ("XMLDATA" chipsxmltable1 x);


    Output:
    --------

    XMLDATA
    -----------------------------------------------------------------
    <? XML version = "1.0"? >
    < xmlns:samp samp: field1 = "http://www.oradev.com/chipsxml.xsd" >
    < USE >
    No. < U01 > < / U01 >
    No. < U02 > < / U02 >
    Y < U03 > < / U03 >
    < U03a > Y < / U03a >
    < U03b > Y < / U03b >
    < U03c > Y < / U03c >
    Y < U04 > < / U04 >
    Y < U05 > < / U05 >
    < / UTI >
    < / samp: field1 >


    To display the data as a single string without structure using "getstringval()":
    ---------------------------------------------------------------------------------

    3 query
    ---------

    Select extract (XMLDATA, "//text()').getstringval()"CHIPS - XML"of chipsxmltable1 x;)

    Output:
    -------

    CHIPS - XML
    ---------------------
    NoNoYYYYYY


    To display the data as a single string without structure using "getclobval()":
    ---------------------------------------------------------------------------------

    4 query
    -------

    Select extract (XMLDATA, "//text()').getClobVal()"CHIPS - XML"of chipsxmltable1 x;)

    Output:
    --------

    CHIPS - XML
    -----------------
    NoNoYYYYYY


    To display the data in a tag with or without structure (which does work) using the function "EXTRACT":
    -------------------------------------------------------------------------------------------------------------

    6.query:
    ---------

    Select extract (XMLDATA, "/Field1/text()').getstringval()"XMLDATA' chipsxmltable1 x;

    Select extract (XMLDATA, "/Field1/UTI').getstringval()"XMLDATA' chipsxmltable1 x;

    Select extract (XMLDATA, "/Field1/UTI/U01').getstringval()"XMLDATA' chipsxmltable1 x;

    Select extract (XMLDATA, "/Field1/UTI/U01/text()').getstringval()"XMLDATA' chipsxmltable1 x;


    Output:
    --------

    CHIPS - XML
    ---------------------------------------



    The queries above are not fetch the value.



    To display the data in a tag with or without structure (which does work) using the function "EXTRACTVALUE":
    ------------------------------------------------------------------------------------------------------------------

    7 query:
    ----------

    Select extractValue (XMLDATA, ' / Field1/UTI ') 'XMLDATA' of chipsxmltable1 x;

    Select extractValue (XMLDATA, ' / U01/UTI/Field1 ') 'XMLDATA' of chipsxmltable1 x;


    Output:
    --------

    X
    -



    The queries above are not fetch the value.


    My question is:
    --------------------
    How to extract the values of xml tag when the value are inserted through xml schema?


    My apologies if the description is not clear. Kindly let me know if further details are required. Thanks a lot for your help.

    Very cordially,
    Godwin Castro C.V.

    Hello

    You must declare the namespace of each element used in the XPath expression, like this:

    SQL> select extractvalue( XMLDATA
      2                     , '/samp:Field1/UTI/U01'
      3                     , 'xmlns:samp="http://www.oradev.com/chipsxml.xsd"' ) "XMLDATA"
      4  from chipsxmltable1 x
      5  ;
    
    XMLDATA
    --------------------------------------------------------------------------------
    No
     
    
    SQL> select extract( XMLDATA
      2                , '/samp:Field1/UTI'
      3                , 'xmlns:samp="http://www.oradev.com/chipsxml.xsd"'
      4                ).getstringval() "XMLDATA"
      5  from chipsxmltable1 x
      6  ;
    
    XMLDATA
    --------------------------------------------------------------------------------
    
      No
      Y
      Y
      Y
      Y
      Y
      Y
      Y
    
     
    

    Please see EXTRACT and EXTRACTVALUE documentation:
    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14200/functions051.htm#i1006712
    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14200/functions052.htm#SQLRF06173

    BTW, 'XMLDATA' is a pseudo-column used by Oracle. I don't know if it will never cause any conflict, but perhaps you need to rename your column.
    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14200/pseudocolumns010.htm#SQLRF00256

    Kind regards.

  • Find and replace grep Question.

    I'll put up paragraph styles and I'm changing anything with < CR > in a ^ p.  How do I do this with a string of grep?  I am wanting to add this string grep grep style in the paragraph styles.

    With GREP Styles you can not change the text, but the formatting of the text.
    You will need an action of find/replace with the TEXT or GREP find/replace.

    Uwe

  • Need help to compare and replace

    Hi all

    I have a cumulative file that is added at the end of the month. The Table contains information about customers, like:

    customer_id, name, address, phone, notes, DATE_STAMP

    In addition, I have other Tables that are divided into monthly Tables and information for these monthly tables are obtained from this cumulative one table. When I collect the information at the end of the month (which is added to the summary table that grows in size), I put the name of the MONTH in the column DATE_STAMP. MARCH, APRIL, MAY, JUNE, etc...

    So I select all of MARCH (from the cumulative Table) and then who is put in the MARKET Table. These Tables are compared with others a month control Tables for analysis.

    The challenge is what to say in APRIL or MAY, a value important column changes in the summary table so I need to update the monthly tables to reflect this.

    Then... I will concentrate on the key columns.

    customer_id, DATE_STAMP, Sales_Person_Assigned

    In the cumulative table (which has many months), say I select all of MARCH and move customers to a MARCH_TABLE. I'll use a customer as an example:

    customer_id, DATE_STAMP, Sales_Person_Assigned
    12345, MARCH, NULL

    Then in APRIL, most data enters the cumulative file, and those who are stamped APRIL for DATE_STAMP column.

    So, when I check the client who was in MARCH, now in this file, they could be like this: (update of the record sales person)

    customer_id, DATE_STAMP, Sales_Person_Assigned
    12345, MARCH, Frank Smith

    I need a way to take the CUMULATIVE table and compare it with the corresponding MONTH_Table and update that Null for Frank Smith.

    So say what: September today and we have 9 separate Tables Jan - September and ONE cumulative Tables Jan - September, I need only a summary table to check all individual Tables and based on:

    customer_id AND DATE_STAMP - a JOIN match here and if the value is null before in the field of the Sales_Person_assigned, if is no longer null, updated as the new value of cumulative for the monthly tables.

    Any help would be appreciated, sorry if this sounds too complicated.

    user621335 wrote:
    AND (NVL (your. GTP, 'X'). = NVL (tt. GTP, 'Y');

    I know NVL is a function that will replace a value if it is NULL with X or Y. But I wanted to make sure I understand this line. Table your if value is NULL it puts an X (temporarily?) and Y for table tt temporarily?

    So if both are NULL, they will get an X and Y, then they could not equal each other. You can specify that? So that means, if they equal each other, there is no update and to what update? or am I confused?

    Sorry, my mistake - I would have had the same share values and else equal (I've corrected that now).

    If a table your or table tt has a NULL value in a column, no equality will return UNKNOWN, that is, even if we could have a value and the other NULL, it would not be picked up because NULL is the absence of a value and therefore cannot return true or false. NVL will set a value here for the purposes of the motion only, so that either TRUE or FALSE will be returned. Here, the key is that the NVL value must be a value that can never legitimately exist in the column, i.e., 'X' could never be a value in the Sales_Person_Asisgned column. If it's a numeric column, we use-1, or something just as impossible for a legitimate column value.

    If both are NULL, 'X' is equivalent to 'X', so the file will not be updated on this column, if it is NULL, 'X' will not match a legitimate value, so the record will be updated on this column.

  • Find and replace GREP

    I'm looking for formatting a document with a lot of this format

    (g) If an organization wants to launch a station of the line, it must have enough personal certification B1 and B2. This means that they must have sufficient personnel who are B1 and B2 licensed and which have undergone a process of qualification allowing them to release the planes returned to service after that maintenance was performed.

    like to remove the first letter in parenthesis paragraph Style Normal and apply the paragraph Style letter list.

    If I apply the new style I have to manually remove the letter in parenthesis.

    I tried Grep ^ \([\l\u]\) I have also some letters in brackets in the document, it will search only for this, at the beginning of the paragraph. that's the law.

    Any help would be much appreciated I basically just composed the GREP without a clue what I'm doing, I'm learning but rather slowly.

    Thanks, sorry that it is confused, I'm here for any question.

    The trick to remove the text AND change the style of a sudden is to have a replacement value in the field changes or only changes to style. Your grep looks good, then it would take a minor amendment:

    Search: ^ (\([\l\u]\)) (.), and change $ 2 with the style in the change Format settings. $2 is the second subexpression-(.) at the end - and everything that you do replace the first character after your parentheses with himself.

  • CC of Dreamweaver generates one of the 3 error messages when you use find and replace on 8.1 Win 64 bit.

    CC of Dreamweaver generates one of the 3 error messages when you use find and replace is used more than twice in a row. "While executing onLoad in bc_afterSave.htm, the following JavaScript error occurred: at line 188 of file C:\Program Files (x 86) \Adobe|. Adobe DreamweaverCC | Configuration | Shared | ' BC\JS\bc_sites.js': out of memory.

    or

    When executing RunCommand in File_Save.htm, a JavaScript erroroccurred.

    or

    While exciting getDynamicContent inAdressURL.htm, an erroroccirred of Javascript.

    Any thought - I find myself CBWMS of closing and reopening. Will work for the other two find and replace once again before the popup of messaged\s error.

    Cough, cough, cough - 38 500 pages? !  Really?  It's a big site!

    I'm not surprised, that you are short of memory.  Try to limit your F & R records or select files rather than the entire Site.

    Nancy O.

  • 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"}

  • 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

  • In Vista, it is possible to find and replace a specific name that I used many files on the hard drive?

    My apologies if someone already asked this (I couldn't find the answer however). I used the name of a person to dozens of (mostly Word) documents that are kept in many different files on my hard drive. I know that I can dig each document separately and then use hidden word and replace the tool to change the name. But this will inevitably take time. Is it possible to do a through - computer find and replace so that I don't have to do this exercise once? Any help gratefully received. Thank you.

    Hello

    I suggest you go through the article and check if it helps.

    Searching in Windows Vista, part 1

    http://Windows.Microsoft.com/en-CA/Windows-Vista/searching-in-Windows-Vista-part-1-secrets-of-the-search-box

    Searching in Windows Vista, part 2

    http://Windows.Microsoft.com/en-CA/Windows-Vista/searching-in-Windows-Vista-part-2-Start-menu-and-control-panel-search-tips

    Searching in Windows Vista, part 3

    http://Windows.Microsoft.com/en-CA/Windows-Vista/searching-in-Windows-Vista-part-3-using-advanced-search-for-those-hard-to-find-files

    Improve Windows searches using the index: frequently asked questions

    http://Windows.Microsoft.com/en-CA/Windows-Vista/improve-Windows-searches-using-the-index-frequently-asked-questions

    Hope this helps and let us know if you need more assistance.

  • Need help to find bosses and leaders out there

    Hi all

    I need help to find patterns, but also the number of occurrences of these models in the data in the column of the table.

    Consider the examples of data - column of a row in a table:

    'S-S-S-P-S-B-S-S-C-S-P '.

    My requirement is:

    I should get all the models that are followed is "."

    For example, the foregoing, given given bosses and Auditors are
    SS - count is 3
    SP - count is 2
    SB - 1 is
    SS - count is 1

    There is a condition most the above requirement:

    If' is followed by 'A', then 'SA' is not as a model. The model must stretch until a character no 'A' is found.

    Consider the sample data for the above case:

    'S-S-A-S-S-A-A-C-S-P-S-A '.

    previously given given bosses and Auditors are
    SS - count is 2
    SP - count is 1
    SAS - count is 1
    SAAC - count is 1

    The column data is stored as type VARCHAR2.

    I have Oracle Database 11 g Enterprise Edition Release 11.1.0.6.0 - 64 bit Production

    Thanks in advance,
    Girish G

    Hi, Girish,

    Girish G wrote:
    Hi all

    I need help to find patterns, but also the number of occurrences of these models in the data in the column of the table.

    Consider the examples of data - column of a row in a table:

    'S-S-S-P-S-B-S-S-C-S-P '.

    My requirement is:

    I should get all the models that are followed is "."

    Do you mean "I should get all the models who * begin by * of '?

    For example, the foregoing, given given bosses and Auditors are
    SS - count is 3
    SP - count is 2
    SB - 1 is
    SS - count is 1

    Why are there two production lines for "SS"? The other, with count = 1, mean doing just that?

    There is a condition most the above requirement:

    If' is followed by 'A', then 'SA' is not as a model. The model must stretch until a character no 'A' is found.

    Consider the sample data for the above case:

    'S-S-A-S-S-A-A-C-S-P-S-A '.

    previously given given bosses and Auditors are
    SS - count is 2
    SP - count is 1
    SAS - count is 1
    SAAC - count is 1

    The column data is stored as type VARCHAR2.

    I have Oracle Database 11 g Enterprise Edition Release 11.1.0.6.0 - 64 bit Production

    Thank you; version information are very useful.

    Thanks in advance,
    Girish G

    Whenever you have a question, please post a small example of data (CREATE TABLE and INSERT statements) and the results desired from these data.
    For example, the sample data may be:

    CREATE TABLE     table_x
    (       x_id     NUMBER     PRIMARY KEY
    ,     txt     VARCHAR2 (30)
    );
    
    INSERT INTO table_x (x_id, txt) VALUES (1, 'S-S-S-P-S-B-S-S-C-S-P');
    INSERT INTO table_x (x_id, txt) VALUES (2, 'S-S-A-S-S-A-A-C-S-P-S-A');
    

    and the results desired from these data can be:

    X_ID TXT                       PATTERN                          CNT
    ---- ------------------------- ------------------------- ----------
       1 S-S-S-P-S-B-S-S-C-S-P     SB                                 1
       1 S-S-S-P-S-B-S-S-C-S-P     SC                                 1
       1 S-S-S-P-S-B-S-S-C-S-P     SP                                 2
       1 S-S-S-P-S-B-S-S-C-S-P     SS                                 3
    
       2 S-S-A-S-S-A-A-C-S-P-S-A   SAAC                               1
       2 S-S-A-S-S-A-A-C-S-P-S-A   SAS                                1
       2 S-S-A-S-S-A-A-C-S-P-S-A   SP                                 1
       2 S-S-A-S-S-A-A-C-S-P-S-A   SS                                 2
    

    (Which is what you have posted, except that there is only one line of output for "SS" when x_id = 1.)

    One way to achieve these results in Oracle 11 is:

    WITH   got_s_cnt    AS
    (
         SELECT     x_id, txt
         ,     REGEXP_COUNT (txt, 'S')     AS s_cnt
         FROM     table_x
    )
    ,     cntr          AS
    (
         SELECT     LEVEL     AS n
         FROM     dual
         CONNECT BY     LEVEL <= (
                                   SELECT  MAX (s_cnt)
                             FROM    got_s_cnt
                               )
    )
    ,     got_pattern     AS
    (
         SELECT     s.x_id
         ,     s.txt
         ,     c.n
         ,     REGEXP_SUBSTR ( REPLACE ( SUBSTR ( txt
                                                 , INSTR (s.txt, 'S', 1, c.n)
                                    )
                             , '-'
                             )
                         , 'SA*[^A]'
                            )       AS pattern
         FROM    got_s_cnt  s
         JOIN     cntr        c  ON  c.n  <= s.s_cnt
    )
    SELECT       x_id
    ,       txt
    ,       pattern
    ,       COUNT (*)     AS cnt
    FROM       got_pattern
    WHERE       pattern     IS NOT NULL
    GROUP BY  x_id
    ,            txt
    ,       pattern
    ORDER BY  x_id
    ,            pattern
    ;
    

    At the heart of this query is the call to REGEXP_SUBSTR:

    REGEXP_SUBSTR ( x
               , 'SA*[^A]'
               )
    

    who is looking:
    S = the letter S
    A * = the letter A, 0 or more times
    [^ A] = nothing, except the letter A

Maybe you are looking for