Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
G
gtksourceview
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 52
    • Issues 52
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 8
    • Merge Requests 8
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • GNOME
  • gtksourceview
  • Issues
  • #33

Closed
Open
Opened Jan 01, 2019 by archbugaboo@archbugaboo

"\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
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: GNOME/gtksourceview#33