Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

grep capture group

# matches and returns b
$ echo "abc" | grep -oP "aK(b)(?=c)" 
b 
# no match
$ echo "abc" | grep -oP "zK(b)(?=c)"
# no match
$ echo "abc" | grep -oP "aK(b)(?=d)"
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #grep #capture #group
ADD COMMENT
Topic
Name
8+1 =