Skip to content

Instantly share code, notes, and snippets.

@sroller
Created September 15, 2020 19:52
Show Gist options
  • Save sroller/5f87e9f273080d8876a4fcad4efe807d to your computer and use it in GitHub Desktop.
Save sroller/5f87e9f273080d8876a4fcad4efe807d to your computer and use it in GitHub Desktop.
ruby regexp post #1
entry="CN=steffenr,OU=Users,OU=Accounts,DC=big-company,DC=com"
capture=entry.match(/CN=(.*),/)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment