Created
September 15, 2020 19:54
-
-
Save sroller/74e22dcf3c58dafd8da132f71d889f4d to your computer and use it in GitHub Desktop.
ruby regexp post #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
entry="CN=steffenr,OU=Users,OU=Accounts,DC=big-company,DC=com" | |
capture=entry.match(/CN=((?:(?!,).)*)/) | |
capture[1]="steffenr" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment