Skip to content
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

VBScript flavor #723

Closed
chrisjj opened this issue Nov 7, 2016 · 13 comments
Closed

VBScript flavor #723

chrisjj opened this issue Nov 7, 2016 · 13 comments

Comments

@chrisjj
Copy link

chrisjj commented Nov 7, 2016

No description provided.

@OnlineCop
Copy link
Collaborator

For Code Generator, or as another regex flavor?

@chrisjj
Copy link
Author

chrisjj commented Nov 7, 2016

Another regex flavour. Which unfortunately is not well documented .

@TWiStErRob
Copy link
Collaborator

TWiStErRob commented Nov 7, 2016

Basic syntax is pretty normal: https://msdn.microsoft.com/en-us/library/1400241x(v=vs.84).aspx
The replacement string is usually not documented, but most languages support the $n syntax, Ansgar's answer pretty much documents those: http://stackoverflow.com/a/40438909/253468

I think using JavaScript flavor is a pretty safe bet for coding regex against (J|VB)Script. You can compare the JavaScript syntax to MSDN. At a very quick glance I didn't find diff.

@chrisjj
Copy link
Author

chrisjj commented Nov 8, 2016

The replacement string is usually not documented ... Ansgar's answer pretty much documents those: http://stackoverflow.com/a/40438909/253468

Pretty much? Or completely?

@TWiStErRob
Copy link
Collaborator

Pretty much. I think that is as good as it gets unless you reach out to MS for a language spec.

http://regular-expressions.mobi/vbscript.html has the same info.

Btw, as far as I know regex101 supports all types of replacement syntax at once, regardless of selected flavor, so when doing replacement you may get different behavior than generated code. e.g. #711

@chrisjj
Copy link
Author

chrisjj commented Nov 8, 2016

Pretty much.

So what's missing?

Btw, as far as I know regex101 supports all types of replacement syntax at once, regardless of selected flavor, so when doing replacement you may get different behavior than generated code. e.g. #711

Wow. Thanks for the warning.

@firasdib
Copy link
Owner

firasdib commented Nov 8, 2016

Does anyone actually still use VBscript 😄 ?

@chrisjj
Copy link
Author

chrisjj commented Nov 8, 2016

Unfortunately some have to... until they can afford the time to port out of that muddle.

@TWiStErRob
Copy link
Collaborator

You can use it to script Windows/Microsoft Office objects. For example open an Word file and save it as PDF, or modify registry entries during an installation/setup process. Essentially automation for Windows or macro-like programs that work on any/multiple Office documents. simultaneously. The alternative to these is to write C++ or .NET code with all the weird linking, compiling and IDEs that you need; for those cases it's much easier to fire up Notepad and write code that can be run on any Windows system without installing extra programs.

@chrisjj
Copy link
Author

chrisjj commented Nov 8, 2016

code that can be run on any Windows system without installing extra programs

Windows 95 excepted :)

@TWiStErRob
Copy link
Collaborator

Heh, so you're saying it works on Windows 3.11 and 1.0?
Btw, do you have any current Windows 95 users among your company/friends/family?

@chrisjj
Copy link
Author

chrisjj commented Nov 9, 2016

Heh, so you're saying it works on Windows 3.11 and 1.0?

No... :)

Btw, do you have any current Windows 95 users among your company/friends/family?

None that have confessed :)

@Zarthus Zarthus changed the title Please add support for VBscript regular expressions VBScript flavor Mar 30, 2017
@firasdib
Copy link
Owner

firasdib commented Jan 8, 2019

I don't think this is worth it. Reopen if you feel otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants