A simple command-line regular expression tool written in multiple languages.
As of right now, the tool is written in C++ and Java. In the future, I intend to write a version in Go.
- The executable (C++) for linux is inside the bin directory. For other Operating Systems, please build from source using the relevant toolchain(s).
- Ensure that you have a Java runtime installed in order to run Java bytecode.
regex-cli/
├── cpp
│ ├── bin
│ ├── src
│ └── README.md
├── java
│ ├── bin
│ ├── legacy
│ ├── src
│ └── README.md
├── SPECIFICATION.md
└── README.md
$ git clone https://github.com/DreamLineLove/regex-cli.git
// From project root
$ java -cp java/bin/ RegexCLI --file-path="java/sample.txt" --pattern="foo"
$ java -cp java/bin/ RegexCLI --file-path="java/sample.txt" --pattern="bar"
$ java -cp java/bin/ RegexCLI --file-path="java/sample.txt" --pattern="foo" -v
$ java -cp java/bin/ RegexCLI --file-path="java/sample.txt" --pattern="bar" -v
$ java -cp java/bin/ RegexCLI --file-path="java/sample.txt" --pattern="foo" -l
$ java -cp java/bin/ RegexCLI --file-path="java/sample.txt" --pattern="bar" -l
$ java -cp java/bin/ RegexCLI --file-path="java/sample.txt" --pattern="foo" -vl
$ java -cp java/bin/ RegexCLI --file-path="java/sample.txt" --pattern="bar" -vl
Please be sure to mind the "relative" path of the file and where you are running the commands!
If you are curious about the various considerations made during the development of the Java version, please look into SPECIFICATION.md.
Thanks for visiting my little code repository!