Skip to content
This repository was archived by the owner on Nov 6, 2023. It is now read-only.
This repository was archived by the owner on Nov 6, 2023. It is now read-only.

Some regexps use ? quantifiers for look-aheads #2842

Description

@RReverser

Probably purely a code style issue, but some regular expressions use constructs like (?=...)? which is valid in JavaScript but don't make sense and only complicate expressions. Here's a list of all the found ones:

{ input: '^http://www\\.heteml\\.jp/[^?]*(?=\\?)?',
  error: 
   { name: 'RegexSyntaxError',
     type: 'NothingRepeat',
     lastIndex: 36,
     message: 'Nothing to repeat!Repeat after assertion doesn\'t make sense!' } }
{ input: '^http://store\\.mandriva\\.com/[^?]*(?=\\?.*)?',
  error: 
   { name: 'RegexSyntaxError',
     type: 'NothingRepeat',
     lastIndex: 43,
     message: 'Nothing to repeat!Repeat after assertion doesn\'t make sense!' } }
{ input: '^http://soe\\.stanford\\.edu/+(?=\\?.*)?$',
  error: 
   { name: 'RegexSyntaxError',
     type: 'NothingRepeat',
     lastIndex: 37,
     message: 'Nothing to repeat!Repeat after assertion doesn\'t make sense!' } }
{ input: '^http://(?:www\\.)?tescofinance\\.com/+(?=\\?.*)?$',
  error: 
   { name: 'RegexSyntaxError',
     type: 'NothingRepeat',
     lastIndex: 46,
     message: 'Nothing to repeat!Repeat after assertion doesn\'t make sense!' } }
{ input: '^http://hilfe\\.udmedia\\.de/[^?]*(?=\\?.*)?',
  error: 
   { name: 'RegexSyntaxError',
     type: 'NothingRepeat',
     lastIndex: 41,
     message: 'Nothing to repeat!Repeat after assertion doesn\'t make sense!' } }
{ input: '^http://livechat\\.udmedia\\.de/[^?]*(?=\\?.*)?',
  error: 
   { name: 'RegexSyntaxError',
     type: 'NothingRepeat',
     lastIndex: 44,
     message: 'Nothing to repeat!Repeat after assertion doesn\'t make sense!' } }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions