RegExp - String in VBA

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi,

I am just trying to validate my controls using RegExp in VBA, My
request is

1. Users are not allowed to enter any text which contains only special
chars (either single char or 'n' chars)
e.g. : ....................... or /////////////////////
or )))))))))))))))))) or ***************

2. Users are not allowed to enter any text which contains combination
of the special characters
e.g. : ............///////////$$$$$$$$ or (((((((()))))))){{{{{{{{ or
||||||||||||\\\\\\\\\???????

Basically users can enter Any text but length should be minimum 3
chars and
They can use these special characters in between the text.

e.g. 1 - This is test message -- given by Mr. M.S.K
e.g. 2 - "Hello !!!!"- I am M.S.K(USA)

What's the correct RegExp ?

Thanks in advance

MSK.

.



Relevant Pages

  • Regular Expression - String Manipulation in VBA
    ... I am just tiring to validate my controls using RegExp in VBA, ... chars ... They can use these special characters in between the text. ...
    (comp.lang.basic.visual.misc)
  • Re: [STRING] extract a word and text around it
    ... I'd like to have the chunk of text on the left ... To maintain the *Lewinsky* Story's original feel, ... If the "T" isn't within the 30 chars on left, ... If a single RegExp doesn't workt, ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Regular Expression for HTML Tags and Special Characters
    ... you should be using a parser instead of regexp ... minimally match anything (. ... make a back reference to what was found between the first. ... Match a < followed any number of ws chars, ...
    (comp.lang.perl.misc)
  • Re: How to ignore special characters
    ... On 10/7/2011 3:57 AM, balajee wrote: ... Is there a way to ignore special characters while doing regexp. ... if you really want to use regexp, but want to match literal strings ...
    (comp.lang.tcl)
  • Re: regexp spaces problem
    ... regexp "kb" $t dummy a ... (match 0 or more chars) ... Your second regexp now matches because \s* and .* match nothing as ...
    (comp.lang.tcl)