Reputation: 423
What regex rule would drop the preceding "> " (greater than symbol followed by a space).
> Bay of Pigs
translates to
Bay of Pigs
I have tried:
[^>\s]
which has not worked
Upvotes: 1
Views: 52
Reputation: 18753
You can use positive look-behind,
(?<=>\s).*
Positive Look-behind
(?<=...)
Ensures that the given pattern will match, ending at the current position in the expression. The pattern must have a fixed width. Does not consume any characters.
Concisely, it matches anything after >
and a space character \s
Upvotes: 1