How to compare strings to other strings in the same array which contains regular digits
2 views (last 30 days)
So I need to compare several string with eachother and want to know if there are dublicates which is not exactly the same.
An example of the strings are as follow F0_G70_C0 ; where the letters are always the same but the digits changes.
Sometimes there are other strings that follows but I only want to see if there are dublicates of what I wrote.
Is there a way to have a code that would work as if Fx_Gy_Cz = Fx_Gy_Cz; do ****, where then x,y,z are random digits.
Thank you in advance
Rik on 1 Dec 2021
If the digits are the same, then the strings will be the same as well. So why not use strcmp?
Or (if you're actually using the string data type) you can even use equals: