Mouth
Well-known member
Hi,
I'm only a basic regex'er, so looking for some help please. Wanting to grep the xf config.php to pull out the db username.
config.php contains
my best effort, yet still unsuccessful, grep so far is
Can anyone assist with the correct regex for the grep to pull out myusername please?
I'm only a basic regex'er, so looking for some help please. Wanting to grep the xf config.php to pull out the db username.
config.php contains
PHP:
[...]
$config['db']['username'] = 'myusername';
[...]
my best effort, yet still unsuccessful, grep so far is
Code:
grep -o "(\$config\[\'db\'\]\[\'username\'\]\ \=\ \').*" library/config.php
Can anyone assist with the correct regex for the grep to pull out myusername please?