All Questions
1,205
questions
1
vote
2
answers
55
views
Extracting a numeric value from the middle of a String field in MS Access 2016
Our department uses a Microsoft Access database to manage roughly 300,000 records. The front-end of the system allows users to add comments to a donor's record. As you might guess, the comment field ...
1
vote
1
answer
41
views
VBA Backreferencing using Regular Expressions Find and Replace
I want to standardize the formatting of some text within a Word document using VBA and regEx. For example, my document would contain text strings such as "Qty #", "Qty (#)", "...
1
vote
2
answers
59
views
Why does the regex match words with only letters, when it should match words with both letters AND digits?
BACKGROUND
I want to replace words that contain only letters and digits, and both a letter and a digit, with whitespace. I am using VBA as shown in the example below.
See the proposed solution here:
...
0
votes
1
answer
69
views
VBA Regex in MSAccess - finding a double quote character
Seemingly simple problem. I need to find those records where "long text" field1 in table notes contains lines starting with -" (i.e. hyphen and double quote) using VBA regular ...
0
votes
1
answer
63
views
extracting strings of text with a pattern using VBA
I am trying to write a script in VBA that recovers from an MS Word document any text string starting with two capital letters, followed by four to fifteen numbers, ignoring spaces, "-", and &...
0
votes
0
answers
52
views
Two scripts (Python and VBA) with the same logic produce different results when regex is implemented
I've created two scripts: one in Python and the other in VBA. Both scripts do the same thing but produce different results.
I've used a few links within the scripts to scrape a Facebook link from the ...
1
vote
2
answers
115
views
Excel VBA Regex Code to Trim Leading/Trailing White Space and Blank Lines for Multiple Line Text, and Duplicate Words/Spaces/Commas
Can someone think of better Regex Pattern text than what I have created?
I have tested all related Regex code I can find on this subject, none of it works with multiple lines that have many blank ...
0
votes
2
answers
229
views
How to convert from If Statement to Select Case Statement
The following code is okey.
Sub Macro1()
Dim str As String
str = Sheets("Sheet1").Range("A1").Value
hasArabic (str)
End Sub
Function hasArabic(str As String) As ...
-1
votes
2
answers
302
views
VBA Like operator / Regular Expressions
In VBA, what's the regular expressions that matches each of following strings: 56-... and ...-28?
For the second one I tried the following but to no avail:
Target.Value Like "[\.]{3}[\-]{1}[0-9]{...
1
vote
1
answer
97
views
Non-capturing groups do not work properly to extract Backreferences number ( 1 and 2)
Basically I need to extract specific digits from my string depend on the below pattern.
I have used non-capturing groups to discard some matched string from the end result, But it does not work.
I ...
1
vote
0
answers
55
views
Replacing words with regex in VBA
In each cell of column “A” on tab “Trial” I would like to replace every word “blue” with “white”, except where there is a word “one” before “blue”.
For that purpose, I have tried to apply a regex with ...
-1
votes
1
answer
153
views
VBA Regex pattern to match keywords and their occurrences in all paragraphs only after the ":"
Consider a VBA string created from an array, joined by vbCr.
str = "eager beaver:some are eager to meet me today. They won't be eager tomorrow, but grim in
their faces." & vbCr _
...
0
votes
2
answers
134
views
Extract matched keyword and its matching line or paragraph as regex submatches
The following code snippet loops through single-column tables containing keywords, in a keywords sheet and tries matching these concatenated keywords of each column, to a text string (Str) that has ...
2
votes
3
answers
90
views
Combine three functions into one function to remove all possible spaces around a specific character and a digit(s)
Note: Before I post my question,
I got a suggestion that this Link to answer my question, I have checked it and it dose not.
Because there are more than one user input values on our database system (...
2
votes
3
answers
159
views
RegEx and Excel VBA for date extraction from a filename where date can be dmmyy or ddmmyy
I am trying to rename a set of pdf filenames in the form:
"Joe BLOGGS_3052023.pdf" or "Joe BLOGGS_31052023.pdf"
("FirstName SURNAME_dmmyy" or "FirstName ...