本文介绍了VBScript正则表达式对象(RegExp)是否有好的文档?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们都知道,每个正则表达式实现都有其自身的特点。我需要使用COM Automation的应用程序中的Microsoft VBVScript RegExp对象,但除以下概述外,我找不到适合的文档:

We all know that every regex implementation has its own peculiarities. I need to us the Microsoft VBVScript RegExp object in an app using COM Automation, but I could not find a good documentation for it except this overview:

Microsoft Beefs Up VBScript with正则表达式

Microsoft Beefs Up VBScript with Regular Expressions
http://msdn.microsoft.com/en-us/library/ms974570.aspx

MSDN还包含此部分的正则表达式,但它适用于JavaScript:

MSDN also contains this section for regular expressions, but it is for JavaScript:

正则表达式简介(JavaScript)

Introduction to Regular Expressions (JavaScript)
http://msdn.microsoft.com/en-us/library/6wzad2b2.aspx

我们可以使用此处描述的所有功能吗?

Can we use all the features described in this section for VBScript RegExp object?

推荐答案

根据 Javascript应用中的大多数正则表达式内容在于VBScript。他们对VBScript正则表达式的例外和限制也有非常完整的描述。

According to regular-expressions.info most of the regular expression stuff in Javascript applies to VBScript. They have also a quite complete description of the exceptions and limitations of VBScript regexes.

使用还有一个巧妙的技巧。 方法:操纵替换返回值。

There is also a neat trick you can do with the .Replace method: adding a function reference to manipulate the replace return value.

这篇关于VBScript正则表达式对象(RegExp)是否有好的文档?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-28 03:08