question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Regex doesn't work in syntax highlighting

See original GitHub issue

Hi. I have this regex: https://regex101.com/r/P3WGak/1 And everywhere it works, but not in syntax highlighting. I have this:

<Span foreground="#FF5555">
	<Begin>(&amp;[clkmno])+</Begin>
	<End>((?&lt;!&quot;)&quot;(?!&quot;))|((?&lt;=&quot;&quot;)&quot;(?!&quot;))</End>
</Span>

And, as you can see: obraz It doesn’t work. Why?

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
siegfriedpammercommented, Aug 26, 2022

I will post a working example of what I had in mind in the evening.

0reactions
NotroDevcommented, Sep 19, 2022

Hey. Oh my god, it was 24 days! I returned to my project and I need to reopen this 😢 When I get the idea to get the last quote, I didn’t think of one situation: two or more "". It breaks completely in it… obraz

I can’t use your solution. E.g. &c is the color code, and in my editor it previews it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is syntax-highlighting programming languages using ...
So no, you can't do useful, accurate syntax higlighting just with regex tokenizing, but regexes with hierarchical parsing can do a good job....
Read more >
Why does my regex code not work?
However, when I try to implement it in TeXworks' syntax-patterns.txt file, it doesn't. Any idea as to what I'm doing wrong ? syntax-highlighting....
Read more >
syntax highlight doesn't work correctly if regex match is split ...
I found that, sometimes when a regex match for syntax highlight is split into multipole lines, syntax highlight only matches the part on...
Read more >
Sublime Text: Why regex in syntax highlighting does not ...
In Sublime Text 3, a default syntax highlighting rule paints a SQL SELECT just fine if it's in the same line, but not...
Read more >
Is there a good syntax highlighting hint for regular ...
In Java for example regex's are always in a String, so code highlighting doesn't handle them at all. Ideally capturing groups etc. would...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found