Welcome To Snipplr


Everyone's Recent Snippets Tagged replace



0 1527 posted 16 years ago by petrafull
0 1455 posted 16 years ago by Zwendel
. must be escaped using \ . It means something in regexp
0 1537 posted 16 years ago by godstroke
Read in a remote XML file, change the pubDate date format, and output to specific local file.
0 1316 posted 16 years ago by karlhorky
as a note to self... in order to find it laters... This will only alter the value of fieldname if the conditions in the WHERE clause are met. With replace we only replace a certain string within fieldname with the replace_with string
1 1681 posted 16 years ago by iroybot
0 1129 posted 16 years ago by joe-bbb
0 1042 posted 16 years ago by AlexLocust
0 1176 posted 16 years ago by jturmel
I needed to clean up strings with an unpredictable number of spaces interspersed throughout. Powershell's Replace method to the rescue.
1 4698 posted 16 years ago by ericmorin21
I'll never learn how to use this Markdown system. Anyway, here is the fixed code based on my comment on the following page: http://snipplr.com/view/14206/replace-spaces-with-underscores/ I'm sorry, I don't mean to hijack the code. :(
0 1524 posted 16 years ago by duniyadnd
You can get hostname from script environment - getenv("HTTP_HOST") (?!'.$host.') matches URLs always except local links
0 1260 posted 16 years ago by kossmoss
Affects <A> tags for links starting with $link Example: LinkReplacer ($text, 'http://www.snipplr.com') affects to <a href="http://www.snipplr.com">Snipplr</a> and <a href="http://www.snipplr.com/blog">Snipplr Blog</a>
0 1379 posted 16 years ago by kossmoss
Removed a certain word from a list of links (purely for design reasons). Link length way to long with the link included.
1 2268 posted 16 years ago by 1man
// FUNCION BY Ahmet Alp Balkan // http://www.ahmetalpbalkan.com
2 1802 posted 16 years ago by prf_q
Replace all the occurrences of a string with a replacement in the supplied files.
2 1472 posted 16 years ago by sanjivarunsahayamhotmailcom
Search and replacing all instances of some text within Vim
1 1388 posted 16 years ago by sanjivarunsahayamhotmailcom
0 1130 posted 17 years ago by ginoplusio
strip non alphanumerical characters while typing
1 1113 posted 17 years ago by ginoplusio
Ability to change/add attributes to HTML using JQuery
1 1003 posted 17 years ago by davebowker
1 1535 posted 17 years ago by tonic
Based on the ereg family of functions in PHP.
0 1387 posted 17 years ago by DaveChild
This function uses the power of regexp to check if some bad word are on the text, also offers the posibility to change those word for something else. Examples:\r\n\r\n$texto = \'fuck off!\';\r\nfiltrado($texto); returns true since a bad word has been...
1 1562 posted 17 years ago by oso96_2000
Replace invalid to valid file name by using RegEx
0 1362 posted 17 years ago by tranvinhnt