Replace in Python-* equivalent?
If I am finding & replacing some text how can I get it to replace some text that will change each day so ie anything between (( & )) whatever it is? Cheers! ...
If I am finding & replacing some text how can I get it to replace some text that will change each day so ie anything between (( & )) whatever it is? Cheers! ...
Hello I'd like to replace a string in every column and every table of a specific database. Is there a way to do this ? Thanks in advance :) Edit: That is because I have spotted Gibberish at some locations and it will take me days to fix it one by one ...
Hi, I'd like to know how to replace each match with a different text? Let's say the source text is: var strSource:String = "find it and replace what you find."; ..and we have a regex such as: var re:RegExp = /\bfind\b/g; Now, I need to replace each match with different text (for example): var replacement:String = "replacement_" +...
Hey, what's the most effective way to remove beginning and ending slashes from all rows in a particular column using MySQL? Before: /hello/world/ foo/bar/ /something/else /one/more/* After: hello/world foo/bar something/else one/more/* ...or maybe this should be done in PHP instead? ...
We often replace non-desirable characters in a file with another "good" character. The interface is: procedure cleanfileASCII2(vfilename: string; vgood: integer; voutfilename: string); To replace all non-desirables with a space we might call, cleanfileASCII2(original.txt, 32 , cleaned.txt) The problem is that this takes a rather lon...
I'm using an Edit View in ASP.NET MVC and after an edit it returns the Edited Entity back. What's the best way to get the edited values back to the databse. [AcceptVerbs(HttpVerbs.Post)] public ActionResult Edit(int id, Movies EditedMovie) { var orginalMovie = _db_linq.Movies.First(e => e.Id == id); if (!Mode...
How to replace a string in packets of a connection? I use Delphi. Thanks in advance Leo ...
Alright, here's my current test function: function make_void( str ) { var str_arr = str.split( /[\W]+/ ); var voidstr; var newstr = ""; for ( var i = 0; i < str_arr.length; i++ ) { voidstr = str_arr[i]; // if ( Math.random() <= 0.9 ) // { voidstr = voidstr.replace( /\w/gi, "?" ); // } newstr += voidstr + " "; } do...
Okay this one might be a little tougher. I'm using VB that looks like this: string = Replace(string.ToLower, chr(63), "A") But I also want chr(63) = "B" as well, like this: string = Replace(string.ToLower, chr(63), "B") My problem is that when chr(63) is at the end of a string I need it to be B, and when it's not the end I need it...
I posted this before and got a few answers that haven't worked for me so far. Therefore I'm going to post part of my code so you can see what I'm talking about. The highlighted part is what I pulled from another post and it's not working for me right now. I'm using visual studio 2008 and the program was written in Basic. I pulled mos...
Why do none of these seem to work? String.Replace("/", "_"); String.Replace("//", "_"); String.Replace(((char)47).ToString(), "_"); The string named "FileName" still says "MyFile 06/06/09" ...
I have this code, and I want to know, if I can replace only groups (not all pattern) in Java regex. Code: //... Pattern p = Pattern.compile("(\\d).*(\\d)"); String input = "6 example input 4"; Matcher m = p.matcher(input); if (m.find()) { //Now I want replace group one ( (\\d) ) with number //and group two...
I'm looking into some legacy VB 6.0 code (an Access XP application) to solve a problem with a SQL statement by the Access app. I need to use replace single quotes with 2 single quotes for cases where a customer name has an apostrophe in the name (e.g. "Doctor's Surgery": Replace(customerName, "'", "''") Which will escape the single qu...
I have a search box that can contain multiple values using a comma, eg Pasta, tuna, eggs Im using FULLTEXT mysql search but I need to use some kind of preg_replace to turn Pasta, tuna, eggs into 'Pasta','tuna','eggs' If I enter this 'Pasta','tuna','eggs' into the search box the results are correct. Thanks people ...
First off I don't know much about regex and need to buy a book because it's has proven to me to be difficult to pickup. Ultimately I want to take a dom element, and replace text within straight brackets "[" and "]" and insert a link around the text, and there may be multiple bracket sets in the string. function changeTip() { ...
I have the following method that is replacing a "pound" sign from the file name but I want also to be able to replace the "single apostrophe ' " at the same time. How can I do it? This is the value of filename =Provider license_A'R_Ab#acus Settlements_1-11-09.xls static string removeBadCharPound(string filename) { // Replace...
What solutions are there? I know only solutions for replacing Bookmarks in Word (.doc) files with Apache POI? Are there also possibilities to change images, layouts, text-styles in .doc and .ppt documents? I think about replacement of areas in Word and PowerPoint documents for bulk processing. Platform: MS-Office 2003 ...
I can't any example of this after being unable to puzzle out how it would work on my own. All I want to do is take a string which has been assigned to a value, and use that as the replace match string for all matches. var replacement = 'i'; var text = 'tieiam'; text = text.replace(replacement, ''); // 'teiam' text = text.replace(/ti...
I am writing an XSLT transformation in which I wish to use the Replace function to do a regex match and replace. However, Visual Studio 2008 reports that 'replace()' is an unknown XSLT function. The bit of code itself is: <xsl:otherwise> <td style="border: solid 1px black; background-color:#00CC66;"> <xsl:variable...
Okay, here's what I'm trying to do: I'm trying to use PHP to develop what's essentially a tiny subset of a markdown implementation, not worth using a full markdown class. I need essentially do a str_replace, but alternate the replace string for every occurrence of the needle, so as to handle the opening and closing HTML tags. For examp...