I saw this question: ANTLR4 How can I create a regular expression that allows all characters except two selected ones?
because of this I thought a little bit about antlr4 (I used antlr years ago).
Now I have a other question for example we would have:
A: [a-z]+'ug';
B: [A-Z][a-z]+;
C:
Now I want that C recognize all Characters which not belong to A or B.
How we could make this? What would be here the correct regEx?
C: ~[a-zugA-za-z]
That would be false or?
I thougth a lot, but without sucess.
And a other question is, just for interest.
Now, for example, if I wanted antlr to recognize this for me:
I have e.g. as input:
thisisonlyatest/*oidjqiodjqw*/test
Now i want to delete all between /* */
, so that the result is only:
thisisonlyatesttest
How we could make that?
Or for example the input would be:
thisisonlyatest/*oidjqiodjqw*/test
another line /*kjdqio*/ another text
the result:
thisisonlyatest test
another line another text
I tought that we could make:
A: ('/*'(.)*'*/')
B: ~A
but it didnot work.