anzwdev / al-code-outline

AL Code Outline for Visual Studio Code
MIT License
51 stars 14 forks source link

completion: Remove Number or other chars at beginning of variable name #613

Open f4n0 opened 2 months ago

f4n0 commented 2 months ago

Hi, I have objects names like that "" like "EOS001 Customer List". when using the variable snippet it will successfully trim the prefix but obviously not the AppCode. unfortunately, the AL compiler will throw this error: ' 001 .' is not valid value in this context.AL(AL0519)

using this regex, it will trim the digits or dots at the beginning of a string, and it will create a compliant variable name /^(\d|.)+/gm