I am messing around with one of my databases.. is there away for me to search for a string in ALL the tables.. and replace it with another everywhere it occurs?
I am looking for SQL
Hi,
I am not so good with regex. I am struggling to find a solution for a small functionality.
I have a ajax response which returns a string like "Your ticket has been successfully logged. Please follow the link to view details 123432."
All I have to do is replace that number 123432 with <a href="blablabla.com?ticket=123432"> using javascript.
I have a PDF document with some external links.
I'd like to parse the document, replace the destination of the links then close (and serve) the PDF document, all using PHP
I know I can do this with PDFLib but I don't want to incur this cost.
I could re-write the document with FPDF or DomPDF, but some of these PDFs are quite complex so this would be a major time investment.
Surely there must be a way to do this directly to PDF docs, using native PHP?
TIA
Hello,
I am trying to change the content of a specific line in a batch of files. I thought that would be a piece of cake but for some reason, nothing happens, so I guess I am missing something.
Line 8 should have been replaced.
Here the csh script I used:
!/bin/csh
#
replace context in line xxx by yyy
2010/05/07
set files = ls FILENAMEPART*
echo $files
foreach file ($files)
sed '8,8 s/1/2 /' $file
end
thanks for suggestions
I want to be able to replace style="STUFF"
I keep thinking that this is the correct REGEX:
style=(")(?!")*(")
But for some reason that won't match.
Any ideas?
I am looking for the best br2nl function. I would like to replace all instances of <br> and <br /> with newlines \n. Much like the nl2br function but the opposite.
I know there are several solutions in the PHP manual comments but I'm looking for feedback from the SO community on possible solutions.
Hi, I'm new to SQL Server, and used mysql for a while now...
SELECT A.acol, IF(A.acol<0,"Neg","Pos") as Column2 From Table
I want to do something like that on SQL Server, but there doesn't exist the IF instruction.
How do I replace that if, in a SQL Server 2008 Query?
Can anyone recommend a safe solution to recursively replace spaces with underscores in file and directory names starting from a given root directory? For example,
$ tree
.
|-- a dir
| `-- file with spaces.txt
`-- b dir
|-- another file with spaces.txt
`-- yet another file with spaces.pdf
becomes
$ tree
.
|-- a_dir
| `-- file_with_spaces.txt
`-- b_dir
|-- another_file_with_spaces.txt
`-- yet_another_file_with_spaces.pdf
Hello,
I have the local file path as c:\new folder\pdf\today\k.pdf I want to replace the c:\ with file:\\c|
I tried str_replace('','',) but I get error due to the slash, no stripslash will not work.
Thanks
Jean
Ok so if I have this pattern:
ab&bc&cd&de&ef
And I need to replace all the ampersands except for the first one with commas so it ends up looking like this:
ab&bc,cd,de,ef
Its probably very simple but for the life of me I can't get this one figured out...
Hello,
I have a test class that has a @Resource annotation for a setter and I need to make it Java 1.4 compliant, so obviously the annotation has to go. I'm using Spring.
So, how would I replace something like @Resource("my.resource") so that the setter gets the correct dependency injection? Would I need to make a bean in an xml file?
I'm pretty new to this so if I'm not providing enough information, let me know.
What is the best way to remove all merge fields from a word 2010 document using openxml sdk 2.0, and replace them with a simple text? I have some difficulties to remove them cleanly. Have tried to remove all Run objects that includes a FieldCode with a "MERGEFIELD" defined, and appended a new Run with my text. But I am missing something crucial since the field seems to stay defined for this element.
I'm trying to rewrite the equivalent of the python replace() function without using regexp. Using this code, i've managed to get it to work with single chars, but not with more than one character:
def Replacer(self, find_char, replace_char):
s = []
for char in self.base_string:
if char == find_char:
char = replace_char
#print char
s.append(char)
s = ''.join(s)
my_string.Replacer('a','E')
Anybody have any pointers how to make this work with more than one character? example:
my_string.Replacer('kl', 'lll')
Hi
I want to replace my UIBarButtonItem (used for refresh) with a UIActivityIndicatorView and, when the refresh is finished, I want to turn back to the refresh button and remove the UIActivityIndicatorView. Can anyone help me?
Thanks
Basically I am attempting to use jQuery so that it will search out text on the page and replace it with something else. For example [x]text[/x] will be converted to text which then gets converted from text to the actual html...a round about way of it I am sure but it seems to be the best way to do it given that the forum seems to understand html as plain texst anyway...but ultimately the goal is to use this jQuery to in a way create new bbcode on the forum.
Hi
I want to replace my UIBarButtonItem (used for refresh) with a UIAlertView and, when the refresh is finished, I want to turn back to the refresh button and remove the UIAlertView. Can anyone help me?
Thanks
so the problem is, i have a contenteditable div, with a keyup function binded.
everytime somebody puts a youtube url in it, it has to be replaced by an embedded movie.
i came up with a regex like this :
content.match(/http:\/\/\w{0,3}.?youtube+\.\w{2,3}\/watch\?v=.*?(?=\s)/g);
firefox wil do the replace after a whitespace, but in ie it won't work.
any suggestions?
thnx in advance!
Somehow I can't seem to get string replacement within a foreach loop in C# to work. My code is as follows :
foreach (string s in names)
{
s.Replace("pdf", "txt");
}
Am still quite new to LINQ so pardon me if this sounds amateurish ;)
Hello, I need to use .htaccess file to replace a world in URL
something like this:
example URL: www.hotourism.com/banknotes/banknotes/asia/vietnam/
redirect to: www.hotourism.com/countries-banknotes/banknotes/asia/vietnam/
how can I use mod_rewrite to redirect every URL containt "/banknotes/banknotes/" to the same URL after replacing that word?
I have a mixed Java / C# project and use an ant script that contains a csc task to compile the dll. This works, but I get a warning
[csc] This task is deprecated and will be removed in a future version
[csc] of Ant. It is now part of the .NET Antlib:
[csc] http://ant.apache.org/antlibs/dotnet/index.html
How can I replace the csc task? I can surely create an exec task calling nant with a project.build file, but that feels completely wrong.
Hello,
I have an array in PHP which looks like that:
$test = array('3' => 5);
How could I replace the stringed array key 3?
I tried:
$test['3'] = "New value"
but it don't work, it look like that after that:
array('3' => 5, 3 => "New value")
I have a string like this:
<![CDATA[<ClinicalDocument>rest of CCD here</ClinicalDocument>]]>
I'd like to replace the escape sequences with their non-escaped characters, to end up with:
<![CDATA[<ClinicalDocument>rest of CCD here</ClinicalDocument>]]>
hi,
is there any plugin for Drupal, replacing tags with small icons (see the picture below, the icons are actually small circles, and the different colors are automatically generated.
I need to replace the tags with the circles, for each node, and the starting view.
Furthermore, when the mouse move over the tags, the tag title should appear as pop-up
thanks
Hello,
I have to do something like this
string = " this is a good example to show"
search = array {this,good,show}
find and replace them with a token like
string = " {1} is a {2} example to {3}" (order is intact)
the string will undergo some processing and then
string = " {1} is a {2} numbers to {3}" (order is intact)
tokens are again replaced back to the string likem so that the string becomes
string = " this is a good number to show"
How should it be implemented so that the process is done at high performance ?
Thanks in advance.