0

I need help appending a value to gitosis.conf file using PHP. I'd like to use regular expression to add a new user to members list. Here's the structure of the conf file:

[group devs]
members = user1 user2

[group admins]
members = user1

[group gitosis-admin]
writable = gitosis-admin
Nam Ngo
  • 2,093
  • 1
  • 23
  • 30

1 Answers1

1

http://www.rubular.com/r/ELSAs8RAGZ Should work, you can then easily rebuild a string using $1 and $2, you can replace the first .* (in brackets) with the name of the group you want to append to.

Lee Hambley
  • 6,270
  • 5
  • 49
  • 81