Recent

Author Topic: TRegExpr and negative lookahead ?  (Read 2749 times)

guest58172

  • Guest
TRegExpr and negative lookahead ?
« on: March 21, 2018, 02:34:44 pm »
Hello, it seems that negative lookaheads are not supported ? The following pattern does not compile for example: https://regex101.com/r/tDXjYu/1/. I know that there are other engines but actually i'm stuck because it's a synedit search so i cannot change it.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: TRegExpr and negative lookahead ?
« Reply #1 on: March 21, 2018, 02:43:08 pm »
SynEdit uses RegExpr unit from Sorokin, so you can refer to its documentation for what's supported.

Thaddy

  • Hero Member
  • *****
  • Posts: 14373
  • Sensorship about opinions does not belong here.
Re: TRegExpr and negative lookahead ?
« Reply #2 on: March 21, 2018, 03:12:31 pm »
Hello, it seems that negative lookaheads are not supported ? The following pattern does not compile for example: https://regex101.com/r/tDXjYu/1/. I know that there are other engines but actually i'm stuck because it's a synedit search so i cannot change it.
Do you mean back-propagation (supported) or real negative lookaheads (not supported directly)?
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

guest58172

  • Guest
Re: TRegExpr and negative lookahead ?
« Reply #3 on: March 21, 2018, 03:21:01 pm »
SynEdit uses RegExpr unit from Sorokin, so you can refer to its documentation for what's supported.

At least i see clearly that it's not supported

guest58172

  • Guest
Re: TRegExpr and negative lookahead ?
« Reply #4 on: March 21, 2018, 03:23:07 pm »
Hello, it seems that negative lookaheads are not supported ? The following pattern does not compile for example: https://regex101.com/r/tDXjYu/1/. I know that there are other engines but actually i'm stuck because it's a synedit search so i cannot change it.
Do you mean back-propagation (supported) or real negative lookaheads (not supported directly)?

Lookahead but would you have an example of back propagation for the regex i put in the first post (link) ?

guest58172

  • Guest
Re: TRegExpr and negative lookahead ?
« Reply #5 on: March 21, 2018, 03:32:00 pm »
When i mentioned other engines i thought to BeRo but actually it does not support negative lookaheads either: https://github.com/BeRo1985/flre/issues/27.

That being said i can (and do) use char ranges with gaps to simulate a negated lookahead.

 

TinyPortal © 2005-2018