Regular replace string

From LemonWiki共筆
Jump to: navigation, search

"Replaces part of a text string with a different text string using regular expressions."

Google Sheet[edit]

Icon exclaim.gif Notice the Google Sheet limit:

  • Maximum string length is 50,000 characters in one cell[1]

Excel[edit]

Regular expression was not supported well on Excel. Using the SUBSTITUTE 函數 - Office 支援 function instead.

Icon exclaim.gif Notice the Excel limit:

  • Nested 64 Substitute Formulas limit.
  • Excel function limit 8192 character[2]

PHP[edit]

PHP: preg_replace - Manual