Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 99544

Regex to match anything between = object and (

$
0
0

I'm developing a VS Code extension to support a new language, and for some syntax highlight I want to match any text between = object and (.

I tried the following Regex:

{
    "name": "entity.name.class",
    "match": "(?<==\\s*object).*?(?=\\()"
},

But when I add this to my grammar file it breaks all the other rules that were working, everything turns white again.

That Regex (?<==\s*object).*?(?=\()/g works on https://regexr.com/ with the following text:

!var = object REAL()
!var = object BORE(!bore)
!var =object REAL  ()
!var =object BORE  (!bore)

VS Code doesn't give me any exception or hint why this Regex is not working, does anyone have a clue on why the Regex is not working in VS Code?


Viewing all articles
Browse latest Browse all 99544

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>