About 2,220,000 results
Open links in new tab
  1. How to use string.replace() in python 3.x - Stack Overflow

    Feb 26, 2012 · Official doc for str.replace of Python 3. official doc: Python 3's str.replace str.replace(old, new[, count]) ...

  2. pandas applying regex to replace values - Stack Overflow

    Mar 23, 2014 · It method performs just as fast as the str.replace method (because both are syntactic sugar for a Python loop). However, the advantage of this method over str.replace is …

  3. How to replace part of a string using regex - Stack Overflow

    Apr 28, 2017 · [^\]]* - 0+ (as the * quantifier matches zero or more occurrences, replace with + if you need to only match where there is 1 or more occurrences) chars other than ] (inside a …

  4. Replace multiple characters in one replace call - Stack Overflow

    To replace one character with one thing and a different character with something else, you can't really get around needing two separate calls to replace. You can abstract it into a function as …

  5. How to find-and-replace in Visual Studio code in just the selection ...

    Jun 3, 2017 · Alternative: in Edit > Replace in Files pick-and-choose which matches to replace. Here's another option (which doesn't use the selection) is to pick and choose which matches …

  6. How can I replace every occurrence of a String in a file with ...

    Jun 17, 2013 · This is not true, if one uses the correct answer and the replace is not found, it still writes the file, but there is no changes. E.g. set-content test.txt "hello hello world hello world …

  7. python - Case insensitive replace - Stack Overflow

    May 28, 2009 · It will replace all occurences of pattern in string with repl in a case-insensitive way. def replace_all(pattern, repl, string) -> str: occurences = re.findall(pattern, string, …

  8. python .replace() regex - Stack Overflow

    It will replace non-everlaping instances of pattern by the text passed as string. If you need to analyze the match to extract information about specific group captures, for instance, you can …

  9. Difference between String replace () and replaceAll ()

    May 31, 2012 · replace() accepts a pair of char or charsequence and replaceAll() accepts a pair of regex. It is not true that replace() works faster than replaceAll() since both uses the same code …

  10. How to globally replace a forward slash in a JavaScript string?

    Dec 30, 2010 · The following would do but only will replace one occurence: "string".replace('/', 'ForwardSlash'); For a global replacement, or if you prefer regular expressions, you just have …

Refresh