I have a noisy data..something like
<@ """@$ FSDF >something something <more noise>
Now I just want to extract "something something".
Is there a way on how to delete the text between those two delimiters "<" and ">"?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use regular expressions:
[Update]
If you tried a pattern like
<.+>, where the dot means any character and the plus sign means one or more, you know it does not work.Why!?! It happens because regular expressions are “greedy” by default. The expression will match anything until the end of the string, including the
>– and this is not what we want. We want to match<and stop on the next>, so we use the[^x]pattern which means “any character but x” (x being>).The
?operator turns the match “non-greedy”, so this has the same effect:The previous is more explicit, this one is less typing; be aware that
x?means zero or one occurrence of x.