Continued from Question #Q_21781278 - regarding a function to replace text within a string continued

Posted on 2006-03-23
Last Modified: 2012-06-21
How do I modify this code to include the quote in Call ######## Enter Pin "3000".  I need to eliminate the quotes surrounding the number and replace it with ####.

SomeVar = RegExpReplace(RegExpReplace(RegExpReplace(SomeString, "http://[^ ]*", "http://", True, False), "[\d\.\-\(\)]{7,}", "##########", True, False), "\d{4}", "####", True, False)


Question by:Karen Schaefer
    LVL 92

    Accepted Solution

    Hi Karen,

    Replace the pattern string "\d{4}" with the pattern string "[""\d]{4,6}"


    LVL 92

    Expert Comment

    by:Patrick Matthews

    BTW, when you post a new question that draws on previous questions, it is a good idea to add a link to the past question(s).
    I knew what was going on, but other Experts are probably scratching their heads and thinking, what the heck is RegExpReplace?
    That's not a native function?!?




    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    This article is a continuation or rather an extension from Cascading Combos ( and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
    Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
    In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now