Hi, thanks for the answers. I look at it.
Yes everything is possible.
Problem is: find first "b" not between two "a". There therefore (“-“ just represent random number of char)
ababbb should return me 4
a-b-a-bbb should return 7
baba should return 1
The original problem is that I am trying to clean out comments from my code. So in real life I am not looking for A’s and B’s, but “/*”, and “*/” and “—“.
But I ran into the problem that in some places the /* do not represent a comment, but is part of a text string. Therefore:
SELECT ‘SOME TEXT’, /* this is ….
Here I want to find the position of “/*”.
But:
SELECT ‘SOME /* OTHER TEXT’, /*
Here I should not consider the first /* as a comment but only the second one.
Hi, thanks for the answers. I look at it.
Yes everything is possible.
Problem is: find first "b" not between two "a". There therefore (“-“ just represent random number of char)
ababbb should return me 4
a-b-a-bbb should return 7
baba should return 1
The original problem is that I am trying to clean out comments from my code. So in real life I am not looking for A’s and B’s, but “/*”, and “*/” and “—“.
But I ran into the problem that in some places the /* do not represent a comment, but is part of a text string. Therefore:
SELECT ‘SOME TEXT’, /* this is ….
Here I want to find the position of “/*”.But:
SELECT ‘SOME /* OTHER TEXT’, /*
Here I should not consider the first /* as a comment but only the second one.