I want to know how I can remove those disturbing | special chars in my Script.
Example Html:
<a name="1"> </a><br>|<b>5.11. Monday</b> |
This is only an example they are all over the code some sort of menu Dividers.
Im loading the Page per Ajax in a wrapper and i want to manipulate it there eg removing the menu the only problem is that there are no classes or id with which i can work with so i have to find a solution which is searching for them all.
All these are stored in a div with the class=”main”
You could simply use
replacewith a global regex (modifierg). Just note that you need to escape the pipe because it’s a regex meta character:The forward-slashes are just delimiters,
\|is the literal pipe, andgmakes sure that all occurrences are replaced.