ayecue / greybel-vs

VSCode extension for GreyScript.
https://marketplace.visualstudio.com/items?itemName=ayecue.greybel-vs
MIT License
16 stars 7 forks source link

New GreyHack releasing in a day or two. Regex is coming. #117

Closed Olipro closed 1 year ago

Olipro commented 1 year ago

A few of the string functions have been replaced, in fact, replace has been replaced. split, is_match replace_regex and matches too.

They now use the C# Regex engine. I guess Javascript's will be close enough.

There's an optional additional param that gets mapped to the C# type:

if (option == "i")
{
    return RegexOptions.IgnoreCase;
}
if (option == "m")
{
    return RegexOptions.Multiline;
}
if (option == "s")
{
    return RegexOptions.Singleline;
}
if (option == "n")
{
    return RegexOptions.ExplicitCapture;
}
if (!(option == "x"))
{
    return RegexOptions.None;
}
return RegexOptions.IgnorePatternWhitespace; //default
ayecue commented 1 year ago

Intrinsics, Syntax and Hover texts should be available with 1.9.5 - https://github.com/ayecue/greybel-vs/pull/118.

Olipro commented 1 year ago

Superb!