Year of the Dragon: Through May 28th, claim free Expansion Pack (excluding Vecna Unleashed) or a Greater Elixir of Discovery! Speak to Xatheral in the Hall of Heroes.edit

Game mechanicsNewbie guideIn developmentDDO StoreSocial Media


ChallengesClassesCollectablesCraftingEnhancementsEpic DestiniesFavorFeats

GlossaryItemsMapsMonstersPlacesQuestsRacesReincarnationSkillsSpells


Please create an account or log in to build a reputation and unlock more editing privileges, and then visit DDO wiki's IRC Chat/Discord if you need any help!

User:Faltout/SandBox/Perl regexp encode

From DDO wiki
Jump to navigation Jump to search

Usage[edit]

This template replaces special characters used in Perl regular expressions with their encoding. See https://perldoc.perl.org/perlre.html#Regular-Expressions

Characters replaced:

  • [
  • ]
  • *
  • ?
  • {
  • }
  • +
  • (
  • )
  • ,

Characters not replaced:

  • |
  • ¦
  • &

Note that replacing all the characters one by one is expensive. Use only when necessary. (This could be less expensive with https://www.mediawiki.org/wiki/Extension:ReplaceSet )

CODE[edit]

\{hello\}\(there\).\[I\]\*