Chris Schuld's Blog

personal musings on the composition of software

Main menu

Skip to primary content
Skip to secondary content
  • Home
  • Projects
    • Browser.php – Detecting a user’s browser from PHP
    • Format.php – Formatting User I/O
  • About
  • Contact

Tag Archives: smarty

Extracting Smarty variables from source

Posted on August 23, 2011 by Chris Schuld
Reply

You can extract all of the variables in use from a Smarty template using a simple call to *nix grep with a trivial regex expression. Here is the command:

grep -o "\{\$[-_a-zA-Z0-9]*\}" my-template.tpl
Posted in PHP, Regex | Tagged smarty | Leave a reply

Support this Blog & Software

All of the software on my site is free & open source and will stay that way! If you would like to donate here is the link:

Pages

  • Projects
    • Browser.php – Detecting a user’s browser from PHP
    • Format.php – Formatting User I/O
  • About
  • Contact

Categories

  • Asterisk
  • CentOS5
  • CSS
  • Featured
  • Fedora
  • Firefox
  • Linux
  • OpenVZ
  • Perl
  • PHP
  • Regex
  • Web Development
  • Windows
  • WordPress
  • XHTML

Tags

Asterisk Backup bind Browser.php CentOS5 CSS hylafax IAXModem lamp NFS OpenVZ PBX in a Flash Perl remi rpm smarty XHTML yum
Proudly powered by WordPress