Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

string match on ERE quantifiers fails #28

Closed
dicktyr opened this issue Jan 31, 2017 · 2 comments
Closed

string match on ERE quantifiers fails #28

dicktyr opened this issue Jan 31, 2017 · 2 comments

Comments

@dicktyr
Copy link

dicktyr commented Jan 31, 2017

brace quantifiers in extended regular expression string match test cause syntax error

% ksh -c '[[ abc =~ a{2,} ]] && echo z
ksh: syntax error at line 1: `~(E)a{2,} ]] && echo z' unexpected
% ksh --version
  version         sh (AT&T Research) 93u+ 2012-08-01
@dannyweldon
Copy link

Agreed, this bug exists in 2012-08-01, but I just tried it in 2014-12-24 and it works.

McDutchie added a commit to modernish/modernish that referenced this issue Oct 7, 2017
bin/modernish:
- On AT&T ksh93 2012-08-01 there's a bug where using a bound
  ({x,y}) in an ERE causes a syntax error on [[ foo =~ ERE ]], so
  it's broken and should not be used; include this in the feature
  test so it falls back on awk.
  Ref.: att/ast#28
@siteshwar
Copy link
Contributor

This bug is not reproducible in the current development version. Closing.

citrus-it pushed a commit to citrus-it/ast that referenced this issue Apr 15, 2021
src/cmd/INIT/ratz.c:
- Fix build warning:

  src/cmd/INIT/ratz.c:4741:2: warning: case label value exceeds maximum value for
   type
   4741 |  case 0241:
        |  ^~~~

  The character literal in the switch expression was being treated
  as a signed char while the case label 0241 is greater than 127,
  resulting in this warning.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants