KYYYY#### (9 characters - the last 4 are digits)
KDEYYYY##### (12 characters - the last 5 are digits)
where YYYY is the year
Hello everyone :blush:
I'm trying to have a regex matching this
I mention a @username to test but which does not match this
I mention a @scope/package to test
I made this regex but it is not working :confused:
Could anyone help me for this ? :blush:
What I want is when there is
/ just after
@scopeto not match...
Actually, I should precise my ask :blush:
Let's take the following string
this is a @username1 mention with another @username2 and a @scope/package mention
@username2 should match but not the
@sliceofbytes thanks for your suggestion anyway !
My current (not working) regex is:
But if my text is
this is a @username it will not match
I am trying to match against a sentence like this:
CONTAINS A, B C. MAY CONTAIN X, Y, and Z CONTAINING 1, 2 and 3 and need to capture groups that start with
MAY CONTAIN. Basically, I want to split this into groups where the start is one of those terms and if the same word appears within ignore that.
CONTAINS A,B,C MAY CONTAIN X,Y and Z CONTAINING 1,2,3
To make it worse, there can be variations, for now just CONTAIN, where the start may be CONTAIN, CONTAINS, CONTAINING. In any of those cases the expected groups would be the above still.
Within each "matched" group there can be any combination of characters and numbers (i can extract the symbols).
a = re.sub('^.+?(?=:)', '\n\1', text)