VBScript/VBA RegEx

armsys
2StarLounger
Posts: 105
Joined: 19 Apr 2010, 10:25
Location: Hong Kong

VBScript/VBA RegEx

Post by armsys »

Does VBScript/VBA regex impose the restriction against
1. the length of the string
2. CRLF
Is there any source string length restriction?
Is CRLF (carriage retrun & line feed) allowed in the source string?
Thanks in advance.
Regards,
Armstrong

User avatar
HansV
Administrator
Posts: 78642
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: VBScript/VBA RegEx

Post by HansV »

The length of a string is only limited by available memory as far as I know.
The source string may contain CRLFs. You can match CRLF by specifying \r\n in the Pattern. (\r represents CR and \n represents LF).
Best wishes,
Hans

armsys
2StarLounger
Posts: 105
Joined: 19 Apr 2010, 10:25
Location: Hong Kong

Re: VBScript/VBA RegEx

Post by armsys »

Hans,
Appreciate your fast helpful confirmation.
That's exactly what I expect of VBScript/VBA's regex implementation.
Thanks a gain.
Regards,
Armstrong