regex

  1. B

    VBA Regex Not Recognizing Pattern

    Hi, I'm working on a program that I want to recognize if a cell contains any number in it by leveraging a RegEx. Currently it isn't working and only returns text when the cell has numbers and text. In the cell I have "55112 5 mile radius" & the cell format is listed as general. Would love any...
  2. D

    Use RegEx to creat in cell fuctions that find substrings and modify them in the string.

    Hi, So I have a list if alphanumeric IDs that I'd like to modify using RegEx to create an in-cell function. I've already enabled Microsoft VBScript Regular Expression 5.5, and I'm using the below code: Function simpleCellRegex(Myrange As Range) As String Set regEx =...
  3. T

    PDF to excel quagmire...in theory

    I've been assign a task where I need to map data from a PDF converted excel file to another exported excel file with pre-determined headers. The goal is to standardized the converted PDF so that the data can be extracted to the exported excel file in vba. One big issue I foresee is that the...
  4. Nelson78

    Regex: hidden "" after a substitution

    Hello everybody. I've a cell assuming different values. For example: 105,32 euro Now, with regex I've removed the non numeric value in order to have 105,32 My code: Dim replacement As Object, trunc As String Set replacement = CreateObject("vbscript.regexp")...
  5. E

    Is it possible to use RegEx in Search and Replace?

    Hello I want to use back references and regex with Search and Replace, is it possible? Thanks!
  6. P

    Highlighting temperatures on cell change

    When the contents of a cell changes, some strings are highlighted. This part I got working already. Now I added a regex to highlight strings that contain a temperature as well (i.e. 13° or 10°-25°) This part however does not work (no error but just no output) This is what I have so far. This...
  7. Caleeco

    Regular Expression TidyUp

    Hello, I have just waded into the world of Regular Expressions. I have created a Function (with some googling) that will check if a pattern exists at the start of a string. The function works as anticipated but Im not sure if this pattern is as clean as it could be? The Pattern is...
  8. 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...
  9. 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.
  10. 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...
  11. 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...
  12. 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...
  13. 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...
  14. 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...
  15. 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...
  16. 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...
  17. 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...
  18. 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...
  19. 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...
  20. 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...

Some videos you may like

This Week's Hot Topics

Top