A collection of some of my useful Regular Expression Tips and Tricks.
Given the following list of input:
1test2
test2
1test
test
test 123
#test
\test
@test
#$test
\$test
A regex .*[\S]*
will match ALL from the input:
1test2
test2
1test
test
test 123
#test
\test
@test
#$test
\$test
Given the following list of input:
1test2
test2
1test
test
test 123
#test
\test
@test
#$test
\$test test
A regex .*[\S]*\$.*
will match line containing $ from the input:
#$test
\$test test
Given the following list of input:
1test2
test2
1test
test
test 123
A regex \btest\b
will match the exact word from the input:
test