Usage Examples • Usage Parameters • Install • Contact me
"Easy Regex" is a valuable and straightforward tool that takes your regular expression and displays the matched parts of the text in the output. Give it a try and witness its usefulness in action.
Suppose we possess a file that encompasses a plethora of information, comprising ASN numbers. Our objective is to extract solely the ASN numbers. Let us witness how our tool accomplishes this task for us...
▶ cat things.txt The foremost ASN, AS11111, reigns supreme while the second in line, AS2222, follows closely behind. Additionally, we possess another noteworthy ASN number - AS3333. ▶ cat things.txt | er -r "AS\d+" AS11111 AS2222 AS3333 ▶ cat things.txt | er -r "AS(\d+)" -g 1 11111 2222 3333
-r string Your regex [e.g: ^\w+] -g int Group number -h Help, show usage parameters
go install github.com/ImAyrix/[email protected]