Help for this page

Select Code to Download


  1. or download this
    'Chi_2'   =~ /\bChi_2\b/  # Match
    '!Chi_2!' =~ /\bChi_2\b/  # Match
    
  2. or download this
    ($_ = '\\Chi+3'  ) =~ s/\\Ch\b/$ch/g;      # Won't replace
    ($_ = '\\Chi+3'  ) =~ s/\\Chi\b/$chi/g;    # Will replace
    ($_ = '\\Chi_2+3') =~ s/\\Chi\b/$chi/g;    # Won't replace
    
  3. or download this
    ($_ = '\\Chi+3'  ) =~ s/\\Ch???/$ch/g;    # Won't replace
    ($_ = '\\Chi+3'  ) =~ s/\\Chi???/$chi/g;  # Will replace
    ($_ = '\\Chi_2+3') =~ s/\\Chi???/$chi/g;  # Will replace
    
  4. or download this
    /\\([a-zA-Z]+)/ exists($vars{$1}) ? $vars{$1} : "\\$1" /eg