Results 1 to 19 of 19

Search not pattern in regexp

Threaded View

daboho Search not pattern in regexp 12-01-2017, 09:22 AM
CK76 Re: Search not pattern in... 12-01-2017, 09:27 AM
daboho Re: Search not pattern in... 12-01-2017, 09:33 AM
xlnitwit Re: Search not pattern in... 12-01-2017, 09:41 AM
daboho Re: Search not pattern in... 12-01-2017, 09:49 AM
jindon Re: Search not pattern in... 12-01-2017, 10:23 AM
xlnitwit Re: Search not pattern in... 12-01-2017, 10:02 AM
daboho Re: Search not pattern in... 12-01-2017, 10:07 AM
xlnitwit Re: Search not pattern in... 12-01-2017, 10:18 AM
daboho Re: Search not pattern in... 12-01-2017, 10:25 AM
xlnitwit Re: Search not pattern in... 12-01-2017, 10:34 AM
daboho Re: Search not pattern in... 12-01-2017, 10:41 AM
jindon Re: Search not pattern in... 12-01-2017, 10:45 AM
daboho Re: Search not pattern in... 12-01-2017, 10:49 AM
jindon Re: Search not pattern in... 12-01-2017, 10:56 AM
daboho Re: Search not pattern in... 12-01-2017, 11:04 AM
jindon Re: Search not pattern in... 12-01-2017, 11:09 AM
daboho Re: Search not pattern in... 12-01-2017, 11:14 AM
jindon Re: Search not pattern in... 12-01-2017, 11:20 AM
  1. #1
    Forum Expert
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,513

    Search not pattern in regexp

    I have my udf
    In [A1]= i want in B1 find not my pattern 123 text123 with pattern reg.125-123456 and no 2 is reg.444-466669 then in B1=aa(a1,"[0-9]{3}-[0-9]{6}")
    Result after replace use " "
    In b1=i want in B1 result is pattern
    =125-123456 444-466669
    I dont Want my pattern replace become ""
    I want not pattern replace become ""
    Function aa(R As Range, SimbolPattern As String) As String
    With CreateObject("vbscript.regexp")
      .Global = True: .IgnoreCase = False
      .Pattern = SimbolPattern
    If .test(R.Value) Then 
          aa = .Replace(R.Value, "")
    Else
         aa = "No match"
    End If
    End With
    End Function
    How i am use pattern become
    ^[0-9]{3}-^[0-9]{6}"
    Thank every body for your help
    Last edited by daboho; 12-01-2017 at 09:25 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. RegExp Pattern to remove special character
    By BS Singh in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-15-2014, 12:12 AM
  2. [SOLVED] Pattern Search
    By ssjagger in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-05-2012, 10:41 AM
  3. Error with Set RegExp equal to New RegExp vba
    By bdb1974 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 09-22-2011, 05:28 PM
  4. [SOLVED] Syntax to make long RegExp Pattern readable?
    By ahartman in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-16-2010, 02:25 PM
  5. Find string within string - a solution using RegExp.Pattern
    By dschmitt in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-10-2010, 05:59 PM
  6. RegExp Pattern
    By MBCMDR in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-08-2009, 02:09 PM
  7. [SOLVED] pattern matching w/o using VBScript's RegExp Object
    By Chris W. in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-07-2005, 06:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1