約12,700件1ページ目

条件を指定して検索しています。すべての条件を解除する

  • 対象とする言語:日本語
  • 2023/5/18 -Pythonで文字列を置換するには、replace()やtranslate()、正規表現reモジュールのre.sub(), re.subn()などを使う。スライスで位置を指定して置換する ...

    2025/3/5 -この記事では、Pythonのreplaceメソッドでは難しい正規表現による文字列置換をre.sub()関数を使って実現する方法を解説します。

    2025/9/18 -正規表現で文字列を置換する場合は re.sub メソッドを使用します。 置換後の文字列 = re.sub(正規表現, 置換する文字列, 置換される文字列 [, 置換回数]).

    2022/9/6 -How to replace the first occurrence of a regular expression in Python? 2385 · RegEx match open tags except XHTML self-contained tags. Related.

    2023/12/5 -Regex has the sub() function to find and replace/substitute substrings easily. Python's regex is a module specifically for dealing with text ...

    正規表現パターンに Python の raw string 記法を使えばこの問題を解決できます。 'r' を前置した文字列リテラル内ではバックスラッシュを特別扱いしません。従って、 "\ ...

    2014/9/23 -Replace String using Regular Expression {.*}. Python re.sub method: ----- >>> import re >>> re.sub('.*', 'bar', 'foo') 'bar' ----- Tcl regsub ...

    2023/12/23 -正規表現を使用して変換する方法。reモジュールをimportして使用する。 ... string が変換対象の文字列で、 pattern に合致したものを repl へ変換する。

    2022/3/29 -なぜ、これを機能させるために regex=True を追加する必要があったのでしょうか。そうしないと更新されませんでした。 df = df.replace('% ...

    2022/11/7 -You can also use regular expressions for replacement. By using capture groups, you can extract and handle matched parts. For example, you can ...