Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • G gtksourceview
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 23
    • Issues 23
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 3
    • Merge requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOMEGNOME
  • gtksourceview
  • Issues
  • #33
Closed
Open
Issue created Jan 01, 2019 by archbugaboo@archbugabooContributor

"\K" or "?<=" don't seem to work.

Hello and Happy New Year. This problem was initiated on stackoverflow, and it seems that \K (capital K), or ?<= (which, in the *.lang file it needs to be written as ?&lt;=) don't seem to work. Here's the two version that work on regex101 site, but not in the *.lang file:

<context id="variable-noequal" style-ref="variable">
  <match>variab(le|el)\s+\K([_a-zA-Z][_a-zA-Z0-9]*)\s</match>
</context>`

<context id="variable-noequal" style-ref="variable">
  <match>(?&lt;=(variab(le|el)\s+))([_a-zA-Z][_a-zA-Z0-9]*)\s</match>
</context>`

The first one has no effect, the second one issues a lookbehind assertion is not fixed length. The additional proposal in the comments of the stackoverflow post doesn't work, either (or combinations with the hammer). Am I doing something wrong or is this a known limitation? If the latter, is there a workaround?


Forgot to add: I'm using Archlinux x64, gEdit 3.30.2. The problem is also in Mousepad, Pluma, Xed (I suppose it's to be expected?).

Edited Jan 01, 2019 by archbugaboo
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking