Script that make search and replace based on external configuration file

Hello!
As I have to make a lot of string replacements on text file, I need to write the script that takes values from separate file. It can be on this or other format:
old;new
Search_string;Replace_string
I have searched the web and only found this
thread  but the script download link on this
thread does not function (I have played with import-csv and loops, but I think that I have a lack of the Powershell knowledge to realize this).
Any help would be appreciated.

One possibility:
'old;new',
'Search_string;Replace_string'
) | set-content replacements.txt
$replace = (Get-Content replacements.txt |
foreach {"replace('{0}','{1}')" -f $_.split(';')}) -join '.'
$string = 'old stuff Search_string'
$newstring = Invoke-Expression ('$string.' + $replace)
$newstring
new stuff Replace_string
[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

Similar Messages

  • HTML character entities problem in saved regex search and replace query

    I have a many search and replace regular expression queries (.dwr files) that I have saved. I have a problem specifically with saved queries that contain HTML entities such as "& nbsp ; " or "& shy ;" (spaces added otherwise code doesn't render in browser). For example if I use the following search:
    ([\d]{3}& shy ;[\d]{3}& shy ;[\d]{4}|[\d]{3}& nbsp ;[\d]{3}& nbsp ;[\d]{4})
    (which searches for numbers in the 888-555-1234 or 888 555 1234 formats)
    This will work fine if I manually enter it into the search text area. However if I save it to file and reload it, it will no longer work because the ­ and   characters are now displayed as " " (space) and "-"(shy) rendering the saved query useless as it's no longer searching for the code. I have some fairly long and complex queries and this is becoming a problem.
    Thanks for any help.
    I'm currently using Dreaweaver CS4 at home and CS5.5 at work.

    Thanks for your reply Kenneth, but that is not what I'm trying to accomplish. I'm looking for the HTML entities that exist in the source code which are & shy ; and & nbsp ; (without the spaces). As I mentioned above, if I enter them manually in the search box, I will get the corrrect results. If I save the search and then reload it, the special characters are no longer in HTML and the search is now useless.
    Just for example again
    In an open document in code view insert a number in the format (without the spaces): 888& nbsp;888& nbsp ;8888
    Open a search dialog box and enter (without the spaces): [\d]{3}& nbsp ;[\d]{3}& nbsp ;[\d]{4}
    The search will find that entry.
    Save search as phone.dwr for example. Then load it and try the search again. It won't work because upon loading the search Dreamweaver replaces the HTML code which was saved with the rendered HTML. So now the search shows up as: [\d]{3} [\d]{3} [\d]{4} which will not find the string with hard coded non-breaking spaces that I'm looking for.
    Basically I want to be able to save a search query for reuse. When I load a search query, I want it to be exactly what I saved, not something that DW has rendered (that doesn't work).

  • Catalog manger "search and replace " using xml script

    Hi ,
    we have renamed 6 rpd columns names in rpd & alias is not removed yet .In catalog manager i can search and replace using string .But it takes lot time as they are stored in different reports , which are existing . I am trying to use xml script for replacing them.I got sample script from help file for single column . can anyone help for doing that for multiple strings.I will provide with my inputs .
    my inputs:
    <?xml version="1.0" encoding="utf-8"?>
    <actions>
    <action command="textReplace" oldValue="column 1 " newValue="column one" ignoreCase="true"/>
    <action command="textReplace" oldValue="column 2" newValue="column two" ignoreCase="true"/>
    <action command="textReplace" oldValue="column 3" newValue="column three" ignoreCase="true"/>
    </actions>
    please correct me .

    Given xml content looks okay but just in case check this oldValue="column 1 ", there is additional space at the end.
    I would suggest to extract Analysis report (.csv) using Catalog Manager and find out the list of reports based on those columns.
    This would help you learn with list of reports based on report owners, and then go for the fixing those reports.
    If you go by xml replace you never know the affected reports and you may not confirm until report owners come back to you with issues.
    This might take little bit time but your changes based on proper doc.
    Let me know updates, if helps mark
    Edited by: Srini VEERAVALLI on Feb 19, 2013 3:21 PM

  • Does the labview 8.5 project have a search and replace option that appies to all vi's in the project?

    In 8.2, the only thing the project has to let you search for a vi is "Find vi's on disk", which is redundant since I can do that in windows explorer.  What I want is a way to search for vi's in my application the way the search and replace function works, except I want it to apply to all vi's in a project instead of just the vi's currently loaded in memory.  Do we have this in 8.5?
    -Devin
    I got 99 problems but 8.6 ain't one.

    I'll give an example of what I was trying to do yesterday in 8.2.  I tried to build a source distribution of a large instrument driver.  Since its an instrument driver there is no single top-level vi that contains all vi's - there are different categories of vi's to do different functions on my instrument.  When I'm doing the source distribution I have to do it in several stages since 8.2 doesn't do source distributions right - but thats not really what this post is about.  Anyway, every time I do the distribution I get an error saying CnvrtArrayIntoBitPattern.vi is password protected (and another engineer wrote it and I don't have the password).  So the build fails.  Now I don't know the password, I'll find it out later, but I at least want to know where in the hierarchy this vi is even being called.  I don't know where it is on disk, I don't know what is calling it, it isn't in the project explicitly, it's a dependency.
    If I had a top-level vi that loaded everything, I could just do a search and replace on that vi and find exactly where it is being called in seconds.  But since I am in a project and have no idea where to start looking, there is no way I can find this vi.  Ideally, in 8.5 there would be a search and replace menu option that searches all vi's in a project to find any calls to this vi.  I want to look for all instances of a vi in my project.  It sounds like you still can't really do that in 8.5.
    What I ended up doing is writing a vi that opens all vi's in a folder hierarchy on disk.  I don't know where this vi is, but all vi's in my project are in the same root folder.  So I run my program to open every single project vi.  Then since I know every single vi is open and loaded simultaneously I used the search and replace function on one of them to find all instances of CnvrtArrayIntoBitPattern.vi.  But that is a painstaking process to create a simple search function.
    I think NI is maybe misunderstanding how people are actually using a project.  Not every vi that is being called is going to be explicitly listed in the project.  (Its this same issue that makes source distributions impossible in 8.2 - you can't target dependencies to a support library so every dependency has to be explicitly listed in the project - which is virtually impossible because they are all in different locations and there are hundreds.)  Most people have lots of general purpose vi's they use in many different projects, and they are buried down in code so we aren't even sure where they are all being used.  The new searches you mention assume you already know where the low-level function is and you are looking for their callers.  But sometimes you don't even know where the low level function is.  What if its an NI directory function?  For example, "resample waveform.vi" is an NI function that changed its defaults in 8.2 which meant we had to find every single place we used it and wire "open-interval?" to a constant instead of depending on the default value.  Its in an NI library somewhere and is never listed as a project vi.  So when I needed to find every place through every project that I used this vi, I couldn't do it through  the project manager because there is no search function.  To be practical I add the project-specific vi's to the project, and maybe a couple support directories, but there will always be lots of vi's as dependencies.  But every now and then I'm still going to want to search for one of these vi's.  So in 8.5 there is there still no way to search for vi's that aren't explicitly listed in the project?
    -Devin
    I got 99 problems but 8.6 ain't one.

  • GUI Based tool for search and replace using regular expression

    Hi,
    I have developed this small tool which can be used for search and replace in multiple files using reqular expressions.
    Features:
    1. Full regular expression
    2. GUI based with Highlighted results
    3. Preview for replace available
    4. Pure Java based.
    5. Its like unix sed and grep
    Please visit below site for download/more information :
    http://sourceforge.net/projects/regexsearchrepl/
    Thanks,
    Hitesh Viseria

    I agree with you, it cannot compete grep/sed/awk combination. I couldnt find anything even close to grep/sed for windows which will also have a preview and most important, free. That is what made me write this tool. I am trying to
    improve its performance and more features like history etc.
    Any suggestions on additional features are most welcome.

  • Is possible to have a script that makes a text randomly have caps and lower caps... i would love to create a kind of effect so it would look like manuscript - but it cannot be only the same letter in caps or lower caps - I wOuld NeEd oF SOmeTHing LikE Thi

    Is possible to have a script that makes a text randomly have caps and lower caps... i would love to create a kind of effect so it would look like manuscript - but it cannot be only the same letter in caps or lower caps - I wOuld NeEd oF SOmeTHing LikE This (random) - is it possibel?

    Hi,
    Sample with 2 regex:
    Launching the 1rst regex:
    Launching the 2nd regex:

  • Photos moved from an external HDD to another: Search and replace paths?

    Hi everyone,
    I've been using iPhoto for a few years now and today I have iPhoto '09. I never let iPhoto copy my photos in its library when importing them, since I have most of them stored on an external hard drive. (Also, if the folders within the library would be properly dated like "2008-09-07" and not named like "7-Sep-2008" and "8-Apr-2008" making the former getting listed before the later, and if I could easily manage external volumes, I would be happy. But, I suppose that's a job for Aperture or Lightroom.)
    I have moved my photos from a small 160GB external hard drive to a new 2TB external hard drive. The problem right now is most of my photos in iPhoto can no longer be displayed. It offers me the option to locate a file every time I open a photo, which I can do, but doing the same task for each and every picture among thousands is daunting.
    To manage photos not stored within its library, iPhoto creates an alias to each picture file. I found a Bash script allowing me to perform a search and replace on all symbolic links in a specific directory. However, the problem is aliases are not the same as symbolic links.
    Is there any way for me to perform a search and replace on all the aliases within the iPhoto library in order to make them point to the new hard drive now containing the pictures?
    By the way, I'm also having a similar problem with iTunes:
    http://discussions.apple.com/thread.jspa?threadID=2190505

    This issue is the main reason why I never recommend a Referenced Library. Some folks have had success using an app called _[File Buddy|http://www.skytag.com/filebuddy]_ to reconnect the aliases. If that fails then I'm afraid then you will find yourself reconnecting them manually.
    Running a Managed Library this issue simply doesn;t arise. And of course, you can easily run a Library from an external disk and easily move Libraries between disks.
    Should you wish to consider converting from a Referenced to a Managed library, then AliasHerder is an application that will replace these aliases with the actual files, and so preserve your Library and all your work in it. As always: back up first.
    (Also, if the folders within the library would be properly dated like "2008-09-07" and not named like "7-Sep-2008" and "8-Apr-2008" making the former getting listed before the later, and if I could easily manage external volumes, I would be happy. But, I suppose that's a job for Aperture or Lightroom.)
    How iPhoto names the folders within the Library Package is irrelevant as you never access them that way.
    There are many, many ways to access your files in iPhoto:
    *For Users of 10.5 and later*
    You can use any Open / Attach / Browse dialogue. On the left there's a Media heading, your pics can be accessed there. Command-Click for selecting multiple pics.
    Uploaded with plasq's Skitch!
    You can access the Library from the New Message Window in Mail:
    Uploaded with plasq's Skitch!
    *For users of 10.4 and later* ...
    Many internet sites such as Flickr and SmugMug have plug-ins for accessing the iPhoto Library. If the site you want to use doesn’t then some, one or any of these will also work:
    To upload to a site that does not have an iPhoto Export Plug-in the recommended way is to Select the Pic in the iPhoto Window and go File -> Export and export the pic to the desktop, then upload from there. After the upload you can trash the pic on the desktop. It's only a copy and your original is safe in iPhoto.
    This is also true for emailing with Web-based services. However, if you're using Gmail you can use iPhoto2GMail
    If you use Apple's Mail, Entourage, AOL or Eudora you can email from within iPhoto.
    If you use a Cocoa-based Browser such as Safari, you can drag the pics from the iPhoto Window to the Attach window in the browser.
    *If you want to access the files with iPhoto not running*:
    For users of 10.6 and later:
    You can download a free Services component from MacOSXAutomation which will give you access to the iPhoto Library from your Services Menu. Using the Services Preference Pane you can even create a keyboard shortcut for it.
    For Users of 10.4 and later:
    Create a Media Browser using Automator (takes about 10 seconds) or use this free utility Karelia iMedia Browser
    Other options include:
    1. *Drag and Drop*: Drag a photo from the iPhoto Window to the desktop, there iPhoto will make a full-sized copy of the pic.
    2. *File -> Export*: Select the files in the iPhoto Window and go File -> Export. The dialogue will give you various options, including altering the format, naming the files and changing the size. Again, producing a copy.
    3. *Show File*: Right- (or Control-) Click on a pic and in the resulting dialogue choose 'Show File'. A Finder window will pop open with the file already selected.
    Regards
    TD

  • Can I do search and replace in a batch?

    Hi, Everyone:
    Years ago before I start useing Indesign, I had a Chinese Desktop Prepress program named Westwinner, With tahat I could create a file putting all entries  needed to search and replace in, and search and replace all of them in one shot. Now I wonder if I can do the same with Indesign CS4.
    For your reference, the file for batch search I used in Westwinner looks like that:
    x@x'
    y@y'
    z@z'
    etc.
    Thanks for everyone that reply!

    I meant that scripts can be edited in a plain text editor like Notepad on Windows or the equivalnet on Mac. You still need to understand the scripting language. That script should be availble in AppleScript, VBScript (which work only on Mac or Windows, repectively) or JavaScript, which is cross-platform.
    You don't actually need to edit the script itself very much, I suspect, if at all. In the Javascript version (I'm looking at that in the ESTK) on line 116 you'll see: var myFindChangeFile = myFindFile("/FindChangeSupport/FindChangeList.txt")
    This line is telling the script to find the file FindChangeList.txt in the FindChangeSupport folder which shoujld be inthe same folder as the the script itself. All of the instructions for want to find and how to change it are in that text file, which is a tab-delimited file with each find/change operation on a single line. The stucture of that file is described in the comments section above the script code, so you should be able to design a new file to do what you need to do, then change that single line defining the variable to find the new text file and save the script. If you replace the existing FindChangeList.txt with your own file you wouldn't even need to edit the variable, but the script as written is so useful I wouldn want to give it up, so I'd make a new text file, edit the variable, and save the script with a new name for your own searches.
    I'm not really a script writer, myself. I read javascript fairly well so I was able to see how this script works, but if you need more help you probably should move over to the scripting forum and talk to the real experts.

  • Search and Replace NTFS permissions by SID

    About to pick up a file server out of an SBS domain and drop it into a new domain.
    When I drop the server into the new domain it will break all the permissions and they will just be SIDs
    Are there any tools or scripts (paid or not) that let me do something like a SID based search and replace within NTFS permissions? 
    Cheers
    Andrew
    This topic first appeared in the Spiceworks Community

    Try this:
    Turn on Show Invisibles in the View menu.
    Select (highlight) the double para breaks.
    Use Command-E  (Find using selected text).
    Open the Find dialogue box (Command-F) and select Find & Replace.The selected para breaks will be in the Find text entry box, but will not be visible!
    Click in the Replace text entry box.
    Select (highlight) a single para break.
    Go to the Edit menu / Find and select 'Use selection for replace' (it will not show in the Replace entry box).
    In the Find & Replace dialogue box, click on the Forward or Back arrows to highlight the selected items (e.g. double para break) where you wish to start replacing in the document.
    Use the Replace All / Replace & Find / Replace buttons as per usual.
    Not a nice solution, but I hope it gets you going until Apple restores the previous functionality!

  • Using a variable in a Powershell search and replace string

    Hi
    a couple of days ago I posted a question about doing a search and replace with wildcards
    Search and repalce with Widcards
    I got a swift and very helpful answer but now I need to build on it.
    In a text file I wanted to replace all the text between two defined words.  the script I got was this
    $text = 'Some Server this bit of text varies Language stuff'
    $text -replace '(.*Server) .+? (Language.*)','$1 it will always say this $2'
    It works great but now I want to replace "it will always say this" with a variable and I can't figure out the correct grammar to make this happen.
    Can anyone help??
    Thanks
    Alex

    Here's one way:
    $replace = 'it will aways say this'if ( $text -match '(.*Server) .+? (Language.*)' )
    { "{0} $Replace {1}" -f $matches[1,2] }
    else { $text }
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

  • How do I search and replace for invisibles in Pages 5.5.2?

    Three related problems all involving search and replace for invisibles.
    1. A block of text where all double returns need to become single returns.
    2. A block of text where all returns need to be replaced with a single word space.
    3. A block of text where all double word spaces to be replaced with a single word space.
    Pages 09 could do all three this handily. How can these be done in Pages 5.5.2?
    Appreciated.

    Here are screenshot of my attempts to make reducing double returns to one. First up selection of a double return:
    Copy to the clipboard. Do a Command-F. Here's the resulting dialogue:
    I paste in the contents of the clipboard:
    Note the Search field no longer has an empty slot selected. Something is clearly in there, but no instance of whatever is has been found. Nevertheless, I proceed to set up the Replace field by selecting a single return:
    Copy that to the clipboard and paste into the Replace field:
    Nothing to search for and therefore nothing to replace. Am now wondering what that little scoop to the right of the eyeglass icon might indicate. Clicking on it reveals this:
    Definitely not "a solution that just works."

  • How do I search and replace in comments in Acrobat XI?

    I use a Mac and just downloaded Acrobat Pro XI specifically to search and replace phrases in comments in a large PDF. According to this Adobe Help page, I should be able to do this: https://helpx.adobe.com/acrobat/using/searching-pdfs.html I copied the relevant section below and marked with ***. However, I don't see I don't see an arrow for the options that would allow me to include comments. I understand how to include the comments with advanced search, but I want to also replace text. I also checked in preferences and searched the forums. Could someone please advise and maybe include a screenshot, if possible. Thanks!
    Choose Edit > Find (Ctrl/Command+F). 
    Type the text you want to search for in the text box on the Find toolbar. 
    To replace text, click Replace With to expand the toolbar, then type the replacement text in theReplace With text box. 
    (Optional) Click ***the arrow ***next to the text box and choose one or more of the following: 
    Whole Words Only 
    Finds only occurrences of the complete word you type in the text box. For example, if you search for the word stick, the words tick and sticky aren’t found.
    Case-Sensitive
    Finds only occurrences of the words that match the capitalization you type. For example, if you search for the word Web, the words web and WEB aren’t found.
    Include Bookmarks
    Also searches the text in the Bookmarks panel.
    ***Include Comments***
    Also searches the text of any comments.

    Here are screenshot of my attempts to make reducing double returns to one. First up selection of a double return:
    Copy to the clipboard. Do a Command-F. Here's the resulting dialogue:
    I paste in the contents of the clipboard:
    Note the Search field no longer has an empty slot selected. Something is clearly in there, but no instance of whatever is has been found. Nevertheless, I proceed to set up the Replace field by selecting a single return:
    Copy that to the clipboard and paste into the Replace field:
    Nothing to search for and therefore nothing to replace. Am now wondering what that little scoop to the right of the eyeglass icon might indicate. Clicking on it reveals this:
    Definitely not "a solution that just works."

  • Search and replace strings in a file while ignoring substrings

    Hi:
    I have a java program that searches and replaces strings in a file. It makes a new copy of the file, searches for a string in the copy, replaces the string and renames the new copy to the original file, thereafter deleting the copy.
    Now searching for "abcd", for eg works fine, but searching for "Topabcd" and replacing it doesnot work because there is a match for "abcd" in a different search scenario. How can I modify the code such that if "abcd" is already searched and replaced then it should not be searched for again or rather search for "abcd" as entire string and not if its a substring of another string.
    In the below code output, all instances of "abcd" and the ones of "Topabcd" are replaced by ABCDEFG and TopABCDEF respectively, whereas according to the desired output, "abcd" should be replaced by ABCDEFG and "Topabcd" should be replaced by REPLACEMEFIRST.
    try
              String find_productstring = "abcd";
              String replacement_productstring = "ABCDEFG";
              compsXml = new FileReader(compsLoc);
              compsConfigFile = new BufferedReader(compsXml);
              File compsFile =new File("file.xml");
              File compsNewFile =new File("file1.xml");
              BufferedWriter out =new BufferedWriter(new FileWriter("file1.xml"));
              while ((compsLine = compsConfigFile.readLine()) != null)
                    new_compsLine =compsLine.replaceFirst(find_productstring, replacement_productstring);
                    out.write(new_compsLine);
                    out.write("\n");
                out.close();
                compsConfigFile.close();
                compsFile.delete();
                compsNewFile.renameTo(compsFile);
            catch (IOException e)
            //since "Topabcd" contains "abcd", which is the search above and hence the string "Topabcd" is not replaced correctly
             try
                   String find_producttopstring = "Topabcd";
                   String replacement_producttopstring = "REPLACEMEFIRST";
                   compsXml = new FileReader(compsLoc);
                   compsConfigFile = new BufferedReader(compsXml);
                   File compsFile =new File("file.xml");
                   File compsNewFile =new File("file1.xml");
                   BufferedWriter out =new BufferedWriter(new FileWriter("file1.xml"));
                   while ((compsLine = compsConfigFile.readLine()) != null)
                         new_compsLine =compsLine.replaceFirst(find_producttopstring, replacement_producttopstring);
                         out.write(new_compsLine);
                         out.write("\n");
                     out.close();
                     compsConfigFile.close();
                     compsFile.delete();
                     compsNewFile.renameTo(compsFile);
                 catch (IOException e)
            }Thanks a lot!

    Hi:
    I have a java program that searches and replaces
    strings in a file. It makes a new copy of the file,
    searches for a string in the copy, replaces the
    string and renames the new copy to the original file,
    thereafter deleting the copy.
    Now searching for "abcd", for eg works fine, but
    searching for "Topabcd" and replacing it doesnot work
    because there is a match for "abcd" in a different
    search scenario. How can I modify the code such that
    if "abcd" is already searched and replaced then it
    should not be searched for again or rather search for
    "abcd" as entire string and not if its a substring of
    another string.
    In the below code output, all instances of "abcd" and
    the ones of "Topabcd" are replaced by ABCDEFG and
    TopABCDEF respectively, whereas according to the
    desired output, "abcd" should be replaced by ABCDEFG
    and "Topabcd" should be replaced by REPLACEMEFIRST.
    try
    String find_productstring = "abcd";
    String replacement_productstring = "ABCDEFG";
    compsXml = new FileReader(compsLoc);
    compsConfigFile = new
    BufferedReader(compsXml);
    File compsFile =new File("file.xml");
    File compsNewFile =new File("file1.xml");
    BufferedWriter out =new BufferedWriter(new
    FileWriter("file1.xml"));
    while ((compsLine =
    compsConfigFile.readLine()) != null)
    new_compsLine
    =compsLine.replaceFirst(find_productstring,
    replacement_productstring);
    out.write(new_compsLine);
    out.write("\n");
    out.close();
    compsConfigFile.close();
    compsFile.delete();
    compsNewFile.renameTo(compsFile);
    catch (IOException e)
    //since "Topabcd" contains "abcd", which is
    the search above and hence the string "Topabcd" is
    not replaced correctly
    try
                   String find_producttopstring = "Topabcd";
    String replacement_producttopstring =
    topstring = "REPLACEMEFIRST";
                   compsXml = new FileReader(compsLoc);
    compsConfigFile = new
    gFile = new BufferedReader(compsXml);
                   File compsFile =new File("file.xml");
                   File compsNewFile =new File("file1.xml");
    BufferedWriter out =new BufferedWriter(new
    dWriter(new FileWriter("file1.xml"));
    while ((compsLine =
    compsLine = compsConfigFile.readLine()) != null)
    new_compsLine
    new_compsLine
    =compsLine.replaceFirst(find_producttopstring,
    replacement_producttopstring);
    out.write(new_compsLine);
    out.write("\n");
    out.close();
    compsConfigFile.close();
    compsFile.delete();
    compsNewFile.renameTo(compsFile);
                 catch (IOException e)
    Thanks a lot!I tried the matches(...) method but it doesnt seem to work.
    while ((compsLine = compsConfigFile.readLine()) != null)
    if(compsLine.matches(find_productstring))
         System.out.println("Exact match is found for abcd");
         new_compsLine =compsLine.replaceFirst(find_productstring, replacement_productstring);
    out.write(new_compsLine);
    out.write("\n");
         else
         System.out.println("Exact match is not found for abcd");
         out.write(compsLine);
         out.write("\n");

  • Bug in Multi-File Search and Replace in RH6?

    I'm using the 6.0 trial, and one thing I want to be able to
    do is to replace the variables I put in using JavaScript with the
    new feature variables in 6.0. So, I went in to multi-file search
    and replace, and searched for:
    <script
    language=JavaScript>document.write(varProduct)</script>
    I copied this code directly from a topic, and pasted it into
    the Search tool.
    I don't even care whether I can successfully copy the code
    from my new variable for use as the replacement text; I'd be happy
    if the multi-file search would simply find all occurrences of my
    original code so I don't miss any during conversion to 6.0.
    It keeps coming up as not found, and this concerns me
    greatly. Has anyone else experienced this? Is it a known bug? Does
    anyone have a workaround?
    Thanks!

    Hi robowriter
    I'm assuming you are using the wondrous little applet known
    as Multi-File Find and Replace.
    Unfortunately, this little beastie is like a cat. It
    frequently has a fussy tummy and loves to hork up furballs. Well,
    not exactly. Really what it does is fail to properly handle
    anything with a line break. So you need a tool that does do this.
    Fortunately, one exists! It is called FAR (Find And Replace). Oddly
    enough, it was also written by a fellow Microsoft Help MVP named
    Rob Chandler. (Rob lives in Australia)
    You can download a trial version of FAR from the FAR page.
    Click here to visit
    the FAR page
    Cheers... Rick

  • Search and Replace String throwing the wrong error message with regexp?

    This came up in a LAVA thread, and I'm not sure if there's a bug here or not. When using Search and Replace string, and using a regular expression of [(G[b|i])], LabVIEW throws error -4622, "There is an unmatched parenthesis in a regular expression."  There are obviously no unmatched parenthesis in that expression, so it seems to me that the wrong error is being thrown. I'm just not sure if that's a syntactically valid regexp. The problem seems to be with nesting [ ]'s inside ( )'s inside [ ]'s. I've tried a couple of regexp resources on the Web, and one suggests it's valid, while the other seems to think it isn't.
    Message Edited by eaolson on 03-13-2007 10:33 AM
    Attachments:
    ATML_StandardUnit2.vi ‏10 KB
    regexp.png ‏5 KB

    adambrewster wrote:
    I think your regexp is invalid.
    In regexps, brackets are not the same as parentheses.  Parens are for grouping, while brackets are for matching one of a class of characters.  Brackets can not be nested.
    If the regexp is replaced with [G[bi]], there is no error, so it's not a matter of nested brackets. I couldn't find anything on the PCRE man page that forbids nested brackets specifically, but it makes sense.
    Your expression "[(G[bi])]", therefore parses as a character class which matches '(', 'G', '[', 'b', or 'i' followed by an unmatched paren, and an unmatched bracket.
    I don't believe that's the case. Replace the regexp with [(Gbi)], and the error goes away. So it's not a matter of the '(' being literal, and then encountering a ')' without a matching '('.
    daveTW wrote:
    what string exactly you want to replace? I think the round braces are not right in this case, since they mark partial matches which are given back by "match regular expression". But you don't want to extract parts of the string, you want to replace them (or delete, with empty <replace string>). So if you leave the outer [( ... )] then your RegEx means all strings with either "Gb" or "Gi".
    It's not my regular expression. A poster at LAVA was having problems with one of his (a truly frightening one), and this seemed to be the element that was causing the problem. I'm pretty sure that the originator of the regexp meant to use G(b|i), which seems like a complicated way of matching "Gb" or "Gi", if you ask me.

Maybe you are looking for

  • My back up is not working. I get a error message, "internal disc needs repair" Any idea what this means?

    Hi, as above, back up not working, message "internal disc needs repair". Can somebody help with the meaning of this. Thank you.

  • Error in Query/Report results

    Hi   I my report in columns i had a structure with 12 elements each for Month based on Restrictions on Current Cal month variable and Offsets. So when user executes reports in columns it will be displayed as MAY2009,JUN2009,JULY2009....DEC2009. my re

  • Random lines in PDF inserted in InDesign document

    I have been generating PDF files from Alibre Design (MCAD) since 2005 with no problem. I 'print' the pages with the current Adobe Acrobat Pro and then place them in the pages of my magazine layout in InDesign. Recently, when I place a PDF generated f

  • Nothing happens when connect iTouch to mac - is the cable already dead?

    Last week when I connected my (4 week old) touch to the right-side usb port, nothing happened, but then it connected fine to the left-sided port; bit funny I thought, but got on with my syncing etc. Today, nothing happens when I connect on either sid

  • ICloud backup doesn't start

    Hello, I have an iPhone 6 and it have always done iCloud backup without problems. Since a couple of week the backup doesn't start automatically when i connect it to the power (and with wifi). I can't find the cause, someone can help me? Thank you