Welcome To Snipplr


Everyone's Recent Snippets Tagged replace



Finds word "AGM" and replace with acronym or abbr title.
2 693 posted 13 years ago by vagrantradio
Stored Procedure for search and replace a string in all fields of all tables of one DataBase
2 738 posted 13 years ago by Eloi
You can use this SP like that; Exec CleanInjection 'INFECTED WORD','CLEAN WORD' (in use : Exec CleanInjection '<script></script>','')
2 668 posted 13 years ago by emregulcan
search for anything in-between two <TAG>'s and then replace the found string into the PHP if/else staement. $1 is wher TextMate stores the found string. (see http://screenflicker.com/mike/code/textmate-regex-replace/)
3 917 posted 13 years ago by rwczippy
This command line aims at moving directories from a target location to the present working directory (pwd), backing the pwd directories up as it encounters them. The script works by: 1. Iterating through the contents of the target directory (us...
0 741 posted 13 years ago by karlhorky
SQL to alter field contents. linked article is in german.
1 794 posted 13 years ago by iroybot
In AS2 forward slashes got url-encoded to %2F when you escaped them. But in AS3 they get ignored and left as they are. In some situations I have found that this can cause problems. So you can do it manually using this regular expression.
0 826 posted 14 years ago by adrianparr
This is useful for when a Wordpress environment goes live; typically the uploads have an absolute URL.
5 874 posted 14 years ago by Jamie
These are essential javascript techniques every javascriptr must know. I will be adding more to this list, let me know what you'd like to see. Thanks!
0 505 posted 14 years ago by alvincrespo
This replaces all .pngx files with .png
0 697 posted 14 years ago by joe-bbb
Obvious but useful for styling Wordpress pagination
0 730 posted 14 years ago by vagrantradio
Find and replace substring in a cell.
0 675 posted 14 years ago by lancemonotone
0 603 posted 14 years ago by sebastianf
This will need to be either embeded or included and you can then just use this as such myNewString = myStringVariable.nl2br();
0 602 posted 14 years ago by boondoklife
0 455 posted 14 years ago by aadsm
Make (and GMake) ignore spaces in many constructs, making it difficult to use a single space as a search string or a replacement string, for example. This trick works around the problem by assigning the space to a variable named SPACE and using that...
1 798 posted 14 years ago by michaelaskew
This snippet shows how to replace the colours in a monochrome image, i.e. one which only contains two colours and the range of hues between them.
0 541 posted 14 years ago by deepsoul
A small collection of the most wanted string-functions in ASP / VB.
1 664 posted 14 years ago by choasis
0 609 posted 14 years ago by berkes
The original string (str) will be changed after calling this function, so if you need it make a copy of it.
0 767 posted 14 years ago by Menda
When you put an image in a printable document, you don't want it to have black (or coloured) background. ImageMagick allows to replace colours even when the coloured regions are non-contiguous. Arbitrary colour values can be specified with `\#12345...
0 525 posted 14 years ago by deepsoul