1

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

0

1 Answer 1

1

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

Click here for demo

Sign up to request clarification or add additional context in comments.

2 Comments

Can you explain what the <= means?
its positive look-behind I have added explanation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.