I'm making a little HTML editor and I would like to know, how to return string/array of chars, that are/is between 2 characters (like > and < or " and ")
Example:
<>Text inside > and <<> or "Text inside " and "".
I'm making a little HTML editor and I would like to know, how to return string/array of chars, that are/is between 2 characters (like > and < or " and ")
Example:
<>Text inside > and <<> or "Text inside " and "".
Take a look at Regular Expressions - they're perfect for this purpose.
Quick tip to help you along - the following expression should give you a match if 'abc' sits between the > and < characters:
(?<=\>)abc(?=\<)