-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regex lookahead / lookbehind questions #163
Comments
Hmmm that regex doesn't look right indeed. There shouldn't be any non-whitespace characters in front of function, so this should be a better regex: /^[\t ]*Func\s+(\w+)\s*\((.*)\)/im |
Hi @vanowm, Thanks for taking a look at this. I will check out your PR in a bit. Regards, Dan |
This depends on where this regex used in the code. Some places use AutoIt-VSCode/src/ai_completion.js Line 110 in 32ca225
other use this regex per individual line: AutoIt-VSCode/src/ai_commands.js Line 915 in 32ca225
|
I'll start off by stating that I am not a regex expert, so apologies if I'm looking at this incorrectly. There are several instances of regex used in this extension that I think need to be reviewed for correctness.
(?=\S)
serves in these instances. Can anyone clarify this for me?(?<!;~\s)
instead of(?!;~\s)
\s
from the end also makes it function better IMOAnyone have thoughts or comments on this topic? Below are the two lines of code --
AutoIt-VSCode/src/ai_commands.js
Line 915 in baac143
and
AutoIt-VSCode/src/util.js
Line 258 in baac143
The text was updated successfully, but these errors were encountered: