Uderc programming article aggregator sites
Index -> PowerShell Replace Text in String

PowerShell Replace Text in String


Powershell replace text in multiple files lookup CSV

Hiya guys After some guidance please. I have a CSV with following details MailboxName, PRFNAME,TempConstant usera, a, usera.prf,TEMPLATEPRFUSER userb, b, userb.prf,TEMPLATEPRFUSER userc, c, userc.prf,TEMPLATEPRFUSER Im after creating multiple copies

Find and Replace text string in HTML

Opps... I hope this forum is not just for Outlook. My Html files reside on my hard-drive. I am looking for VBA code to open specified file names ####File.html and then find and replace text strings within the html for example "####Name" replaced

Use Powershell to replace text with image in Word document

I have a powershell script that uses a Word document as a template to create signatures that I am pushing out to my organization. The document is populated with text formatted the way I want the signature to look, that I then do a FindText and Replac

PowerShell SQL script to replace text in Triggers, Stored Procedure, can't get match

I think my issue is with matching text and regular expression, any help would be appreciated. $server = "BOCADBD2";     # The SQL Server instance name $database = "SYSDB"; # The database name $matchText = "(raiserror\[email protected]\[email protected]

How to user PowerShell -replace to remove the dreaded em dash from a file name?

I have a bunch of .msg files in a directory and want to zip them up (to send them to our spam filtering company), but I keep getting errors on file names that contain the em dash (-).  I believe it's (char)0x2014. [edited]... the correct syntax is [c

Replacing text in a text file with special characters

Hi all, in my test text file i found an interesting issue, where i can't replace text that looks something like this "New Text Document - Copy (2).txt" (gc $logeps)|foreach{$_ -replace "$($file.name)",""}|Out-File $logeps the

Applescript: open Pages doc from Templete, change filename and replace text

Hi! I just got started with applescript and i want a script that does the following: 1. open "choose from list" dialog to choose the topic of my document from 4 possibilities (here for example A, B, C, D) 2. open document from TemplateXY 3. set

Folder action to find and replace text and change line feeds

I want to use a folder action to find and replace text and change Mac carriage returns to DOS line feeds inside text files. The text to be replaced is: "/Users/wim/Music/iTunes/iTunes Music/Music" (without the quotes) This text has to be removed

Find and replace text in multiple Photoshop files?

Hi there, Let us say I have six Photoshop files: 1.psd, 2.psd, ..., 6.psd. All of these files contain the word "LoremIpsum" in random text layers, within each document. Is there a way I can search for "LoremIpsum" in all documents and

Find & Replace Text - Styling Problem (CS5 Mac)

Hi everyone,      Is there a way when finding and replacing a text string to style the block of copy. My problem is that I have some color codes given by the customer that now need to be converted to our internal color matches on our production drawi

Find and Replace text and change font help needed.

I am completely new to Scripting and I'm sure this is quite simple but I do not know where to start. I have a FM template that is populated with "raw" text from a database. Within the text are several characters (+, @, *, $, # and %). I need to

How to used REGEXP_REPLACE  for replace part of string ?

hi How can i replace part of string as following , i want to replace space in date by "-" SELECT REGEXP_REPLACE(upper('Daivd bought stuff by 2000 USD on 12 Sep 2012 from KL and left kl on 20 Sep 2012'), '[0-9]{1,2}[^0-9](JAN|FEB|MAR|APR|JUN|JUL|

Use VBA and Excel to open Dreamweaver HTML (CS5), find and replace text, save and close

I wish to use VBA and Excel to programmatically open numbered Dreamweaver HTML (CS5) and find and replace text in the code view of these files, save and close them. I have  5000 associations between Find: x0001 and Replace: y0001 in an Excel sheet. I

Trouble with "add note to replace text" annotation

When I use "Add note to replace text" in Reader XI, the note acts as if it is locked even though it is not. The Locked box is not checked, but yet the options are grayed out; and I cannot delete the note, though I can edit the text box. "St

Two finger swipe replaces google search string

MBP with Safari 6.0 experiencing this problem.  Another user was experiencing the issue here: http://www.ehmac.ca/mac-iphone-ipad-ipod-help-troubleshooting/99937-safari-two-f inger-swipe-bug-replaces-google-search-string-os-10-7-3-a.html I don't know

I have a Text control string box with some initial text. I would like to highlight old text with click of mouse and type in new data from keyboard

I have a text control string box with some initial text (says: Please enter Name). I would like the operator to click on the text control box and have it automatically highlight so that when new data is typed in the old erases (all at once) and the n

Replace text in photoshop document & save

Hello, I have to make apprieciation certificates for a committee. Is there a way to use Automator to replace text within a photoshop document (people's names) and then save each name in a different file? Thanks!In theory, at least, this should be pos

Search & replace text programmatically in pdf file

I need to search & replace text programmatically (preferably in .NET c#) in existing pdf file. Does anyone know how to do it (maybe with with Acrobat SDK) ? Thanks in advance! A. PS: Well done working example :-)Searching APIs are provided, but there

Replace the connection string in Excel MDS file

I had MDS solution from one SQL Server 2012 to another - SQL Server 2014. I have configured Excel file with connection to MDS. How can I safely to replace the connection string in my Excel MDS file and the tables is not broken? from Moscow with money

Dynamically size movieclip to fit text's string height and width

Hello, I am trying to dynamically size a movieclip to fit the size of a text's string height and width (This text is inside the movieclip) here is my code so far.. var Font1_ = new Font1(); var Format2:TextFormat = new TextFormat(); Format2.size = 36