RgxGen icon indicating copy to clipboard operation
RgxGen copied to clipboard

Lookahead breaks pattern

Open alturkovic opened this issue 1 year ago • 1 comments

Describe the bug It seems like negative lookahead breaks the pattern generated by RgxGen. I am aware that lookaheads have limited support but #63 mentioned in README/limitations does not seem like the same issue to me. Reporting for awareness.

To Reproduce Steps to reproduce the behavior:

  1. With regex pattern '^(?!(False|True)$)[a-zA-Z_][\w]*$'
  2. Use RgxGen.parse(pattern).generate()
  3. Get results such as: yl[>B4BemOeLW2QQsNUPKtExdhKDwkroNwAptvhYx

Expected behavior Any alphanumeric+underscore string starting with a letter or _ that is not True or False.

Environment (please complete the following information):

  • OS: iOS
  • JDK/JRE version = 17.0.8.1-tem
  • RgxGen Version = 2.0

alturkovic avatar Mar 15 '24 19:03 alturkovic

Thank you for reporting this.

Adding some examples for myself: image

curious-odd-man avatar Mar 16 '24 07:03 curious-odd-man