Skip to content

Need to escape regex characters #14

@ZevEisenberg

Description

@ZevEisenberg

I use zsh, and I seem to need to use \ to escape square brackets for regex:

% hc 40[12]  
zsh: no matches found: 40[12]
% hc 40\[12\]
Status code 401
Message: Unauthorized
Code explanation: No permission -- see authorization schemes

Status code 402
Message: Payment Required
Code explanation: No payment -- see charging schemes
(slightly redacted) output of env in case that's useful
TERM_PROGRAM=Apple_Terminal
SHELL=/opt/homebrew/bin/zsh
TERM=xterm-256color
TMPDIR=/var/folders/77/6b3q__f14mqdh2jtshxkxv_r0000gn/T/
TERM_PROGRAM_VERSION=440
TERM_SESSION_ID=7DF7A1C0-52EC-4967-BD07-63850CA1BCD8
USER=igeek
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.IzsBhsLsz1/Listeners
PATH=/Users/igeek/.rbenv/shims:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/sbin:/Users/igeek/go/bin:/opt/homebrew/opt/go/libexec/bin:/Applications/Sketch.app/Contents/Resources/sketchtool/bin/:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/texbin:/Applications/Server.app/Contents/ServerRoot/usr/bin:/Applications/Server.app/Contents/ServerRoot/usr/sbin:/Library/Apple/usr/bin
LaunchInstanceID=A3EAFCE5-1591-41D2-8ACB-3BD4004E8837
__CFBundleIdentifier=com.apple.Terminal
PWD=/Users/igeek/Downloads/NYTimes
XPC_FLAGS=0x0
XPC_SERVICE_NAME=0
SHLVL=1
HOME=/Users/igeek
LOGNAME=igeek
SECURITYSESSIONID=186b7
OLDPWD=/Users/igeek/Downloads/NYTimes/NYTimes.xcodeproj/project.xcworkspace
SYNC_FOLDER=/Users/igeek/Library/Mobile Documents/com~apple~CloudDocs/Sync
ZSH=/Users/igeek/.oh-my-zsh
PAGER=less
LESS=-RiFX
LSCOLORS=Gxfxcxdxbxegedabagacad
GOPATH=/Users/igeek/go
GOROOT=/opt/homebrew/opt/go/libexec
NVM_DIR=/Users/igeek/.nvm
__GIT_PROMPT_DIR=/opt/homebrew/Cellar/zsh-git-prompt/0.5
GIT_PROMPT_EXECUTABLE=python
RBENV_SHELL=zsh
EDITOR=/usr/local/bin/mate -w
LANG=en_US.UTF-8
_=/usr/bin/env

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions