Compare numeric parts of two cells with RegexMatch


I have different URLs in A and B. URLs have different length and nested structure, but all of them have a part /id/any-number/.

I want to compare their IDs (their numeric values) in any way like this:


Is this anyhow possible with RegexMatch?


Sure, I would recommend RegexFind to get the strings. You can also skip the If(x,true, false) statement, it will automatically evaluate bool if you compare two IDs.

So, how about =RegexpFind(A2,regex)=RegexpFind(B2,regex)


hmm, =RegexpFind(A2,\d)=RegexpFind(F2,\d) fires #VALUE :frowning:


You need quotes for the regex string. RegexFind(A2,"\d+"). You can post two example Urls and I can create valid formulas if you can't get it to work.

1 Like