I am looking for a RegEX that would match/select all but the first 3 characters of a string (including whitespace). That is, select from the 4th character onwards, and if there is no 4th (or 3rd, or 2nd) character, there will be no match.
EX1. Given String: "ABC COMPANY"
RegEX should match " Company"
EX2. Given String: "JASON'S PAINTING"
RegEX should match "ON'S PAINTING"
EX3. Given String "AB"
RegEX should not match anything.
I have been able to come up with an expression that would match only the first the characters ^.{3}\s*
, but this is the invert of what I would need.
This is not being used in any programming language so I cannot use string manipulation. For context, this is using Oracle's Enterprise Data Quality RegEX Replace processor.
Thanks in advance.
I don't know whether the Oracle's Enterprise Data Quality RegEX Replace processor
supports the Lookaround or not. But Here is the usual regex if it supports:
(?<=^...)(.*)
Here using positive lookbehind (?<=^...)
it is checking that the match is after the three characters from the begin.
Online Demo
I'm a rookie with regex, but try: (?<=.{3}).+
The part within the parentheses is a positive lookbehind - it gives up the match and only return whether a match afterwords is possible or not. The .+ token means there have to be at least one character. If you know all the characters will be word characters (0-9 a-z A-Z and underscore) or a whitespace, I recommend replacing the later dot with [\w\s].
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With