php - String replacement via Regex -


i've created code writes settings config file (for wordpress eg wp-config), , wraps setting in comments.

such as:

  # start wp_memory_limit   define('wp_memory_limit', '250m');   # end wp_memory_limit 

but inorder optimise code i'm looking drop comments altogether , directly write (and later delete) setting via regex. however, i'm not sure start this. appreciated.

essentially regex able idendify following string of text in config file:

  define('wp_memory_limit', 'xxxxxx'); 

where 'xxxxxx' alphanumerical value.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -