-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
regexp
(still a trivial implementation), add pattern matching t…
…o `switch` statements
- Loading branch information
Showing
6 changed files
with
90 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.TH REGEXP 1 | ||
.SH NAME | ||
regexp \- Check regular expressions | ||
.SH SYNOPSIS | ||
.B regexp | ||
<reg> <txt> <var1> <var2...> | ||
.SH DESCRIPTION | ||
This builin checks | ||
.I txt | ||
against the POSIX regular expression | ||
.IR reg , | ||
and stores the matches in the variables named by the rest of the arguments. If less than 3 args are given to the command, it returns 1. If no matches are found, it returns 2, otherwise it returns 0. | ||
.SH SEE ALSO | ||
.BR grep (1) , | ||
.BR sed (1) , | ||
.BR regex (7) | ||
.SH EXAMPLE | ||
.EX | ||
.EE |
This file contains 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
This file contains 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
This file contains 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