regex

  1. A

    search criteria where contains other than specified condition using Regex

    I have a variable with a string...and I want to know if it contains any value other than single quote, comma and a space ("', ") I'm using vba in excel. for example, i have a variable This should return > 0: strA = "'test', 'player'" I want to check to see if strA has any characters other...
  2. Nayasoch

    How to extract video id from url

    Hello EVeryone, I was wondering if there is anyway or Formula to extract Video id from youtube url . For example below is url https://www.youtube.com/watch?v=Hc7BjYmn9z0 and video id is Hc7BjYmn9z0 Is there any formula that I can use? Thanks in advance.
  3. I

    Selecting a column instead of a cell in a for loop regex search

    So I am doing a regex search, and if I get a match in the cell that I'm searching for I want to move that WHOLE COLUMN to a different position. My code below works in moving it and inserting it where I want it to go but it only moves the cell and not the whole column.. I've highlighter the line...
  4. M

    extract 10 digit number from cell

    In my excel file I have column AK. Each cell is filled with strings. These strings contain numeric and non numeric information. An example of a string is "house 7410145689 October 2018". The stings always contain different information. Sometimes they contain a 10 digit number and sometimes they...
  5. Ombir

    Extract Words using Regex

    Hi, I've a string like "abc.txt def.txt lmn.png jkl.jpeg pvr.txt". THis pattern "\w*(?=\.txt)" only extract file names of text files i.e abc,def,pvr. Now I want the opposite of this. I want to extract file names that are not text i.e lmn and jkl Please suggest the pattern to match this. If...
  6. Roderick_E

    Regex-like parsing

    Hi old friends, been a while since I've been on here; they got me learning python at work. Anyhow, I'm trying to create a VBA with regex-like abilities. I want to look at a string and parse all <*> (ie, <someword>) and replace it with the word as a variable. Example: Hello <username>, We...
  7. J

    Writing a Regex Macro that - stores matches , compares matches , and merges exact and similar values

    (?<word> \w{4,}) This is a php code that does exactly what I want my macro to do. String together characters a-z and 0-9 (not case sensitive) and match words when they are equal to or greater than 4 characters. I am not sure how to get this code into VBA's language. I need it to loop through a...
  8. D

    Extracting data from cell between text or just with text

    I am needing to pull numbers from the middle of a cell. The problem is that the data is entered by many different people and none of them do it the same way. One cell could have “W/.5LWOP/2.75LS” another cell “N 2.5 LS 1.75 LC” another “N 5LS” yet another “N 4@99 1.5LC 2LS 2LU”. Some use spaces...
  9. R

    Use regex to compare cells

    I need to carry out 3 checks between 2 cells Check 1 - Inconsistent capitalization In another tool we use ^[A-Z] (In the filter source field) and ^[a-z] (In the target field) Check 2 - Inconsistent punctuation In aother tools we use \.$ (In the filter Source field) and [^.]$ (In the Target...
  10. ask2tsp

    List variable usage in workbooks. Is this a usefull tool to have?

    Hello fellow developers. I would like you to give feedback on this macro I coded. educational value: the code contains comment lines to explain various coding techniques. Did it help to understand how some things can be done? Working with a dictionary Return multiple values from a function...
  11. C

    conditional formatting, REGEX to excel, do not want VBA, for tag numbers

    I am trying to make a workbook that ranchers and farmers can use (for free) for livestock inventory that does not use VBA (know some excel, and seem to always be learning more), to improve animal disease traceability. 1) AIN tag (15 characters), is...
  12. J

    Regex to replace and change text colour in Excel

    Hi, I have the following VBA code that replaces text using regular expression which works as expected but would like to also change the replaced text colour to red. <!--[if gte mso 9]><xml> <o:OfficeDocumentSettings> <o:AllowPNG/> </o:OfficeDocumentSettings> </xml><![endif]--><!--[if gte...
  13. D

    VBA RegEx match with input box

    Hi, Is it possible to match and Input box answer against RegEx so Special characters are used, can someone help please? This is what I have so far Dim MyStr As String, addStr As String, RegEx As Object On Error Resume Next addStr = InputBox("Cells...", "Enter Character") Set...
  14. D

    Regex to split substring

    Hi, I am trying to figure out how to implement a regex solution to a data field and was looking for some help. I have got a fair bit done using mid and search/find but I am still doing a lot of clean up to the data after extraction to compensate for the different way people record the same...
  15. K

    VBA Code To Parse and Evaluate Various Feet and Inch Notations For Peer Review

    I needed a function to convert feet and inches into a decimal number (eg 5' 10 1/2" => 60.5 (inches)). I found various excel formulas and UDF while googling around but either found them to limiting or error prone. I've cooked up the following RegExp based UDF to evaluate feet & inch strings and...
  16. Dr. Demento

    RegEx criteria - remove punctuation, name honorifics, suffixes

    I am comparing a large dataset by concatenating non-unique identifiers. However, when it comes to names, I'm not getting matches that I should. One of the issues is punctuation and name suffixes (LNAME, Jr., etc.). I thought a RegEx would do the trick, but I'm not that proficient yet. My...
  17. MartinS

    Specific Validation (RegEx?) without VBA?

    I am trying to find out if I can achieve something in Excel to apply some validation, but without using VBA if possible? I have a requirement to validate a column to allow either NNNNNNN.NN or NNNNNNN.NN.NN (N always being numeric). The data will then be imported into SQL by another process, but...
  18. F

    how can i generate regex patten without learning how to do it. is there a software?

    how can i generate regex pattern without going through a lot of trouble of deciphering it. is there any software that generates pattern based on the example input given by user?
  19. A

    Extract a Sub String using regEx

    Excel Friends, I developed this code and it works fine, but I need that the actual string found be the result of the function. For example: If the String is fsdhjfh383hjdjhf8ur2hjfhds/O123456/nfejhfjhef8343847832832/dhhfjshjfh/dhsjdjd the function result should be: O123456 Thanks for any...
  20. gallen

    REGEX on Range of cells

    Hello, I'm not new VBA but fairly green on regex. An example of the cells is: I need to find the "MM" and then all numeric characters to the left including the period. However sometimes the text may have an space between the numerics and the "MM" so I need to allow for this too Ultimately...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top