It would be very difficult to guess what the cause of '<<' and 'L' as line endings might be, without knowing what utility is generating these endings. The most common line ending differences don't involve "L" and "<<", and are particular to differences in how Windows, Linux/Unix, and Macs end their lines. But you said that all the various line ending varieties are being seen on different linux boxes, so that eliminates the Windows and Mac interference.
There isn't a universal metacharacter that matches the letter "L" and the character "<<" (sorry for my use of << instead of your nifty character; my keyboard doesn't have that key and I don't know its ordinal value or HTML entity name), while excluding all other characters. But Perl's regular expressions allow you to create your own character classes, and you can even build your own characters based on ordinal values. For example, if the '<<' character has an ordinal value of 1b (in hex. ...and it doesn't, but just for example...), you could substitute it and 'L' out of existance like this:
s/[L\x1b]//;
Dave
In reply to Re: Regex for replacing hidden character: « and L
by davido
in thread Regex for replacing hidden character: « and L
by neversaint
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |