Hi,
How do I remove the lines where special characters or Unicode characters appear?
The following query does work but I wonder if there is a better way.
cat test.txt | egrep -v '\)|#|,|&|-|\(|\\|\/|\.'
The following lines show that my query is incomplete.
Warning: The word "*Khan" is... (1 Reply)
Hi there,
I'd like to write a script that removes any set of character from any string. The first argument would be the string, the second argument would be the characters to remove. For example:
$ myscript "My name's Santiago. What's yours?" "atu"
My nme's Snigo. Wh's yors?
I wrote the... (11 Replies)
Hello,
Is there a simpler way to remove special characters (color codes) from each lines in a log file?
I use sed like in the example below but I think there should be a more simple way to achieve the same result:
$ cat -vet file1
^, , , ,
Maybe to convert the file somehow?
... (5 Replies)
Dear Members,
We have a file which contains some special characters. I need to replace these special character by a new line character(\n).
The Special character is \x85.
I am not sure what this character means and how we can remove it.
Any inputs are greatly appreciated.
Thanks... (5 Replies)
Hi,
I have a directory that has a file which contained special characters in the filename. Can someone please advise how to remove the file, preferably with a rm -i ?
Thanks in advance.
Listing is as below:
{oracle}> ls -1b
bplog.bkup.001
bplog.bkup.002
bplog.bkup.003
bplog.bkup.004... (1 Reply)
Hi All,
I have a variable like
AVAIL="\
BACK:bkpstg:testdb3.iad.expertcity.com:backtest|\
#AUTH:authstg:testdb3.iad.expertcity.com:authiapd|\
TEST:authstg:testdb3.iad.expertcity.com:authiapd|\
"
What I want to do here is that If a find # before any entry, remove the entire string... (5 Replies)
Hi,
In source data few of columns are having special charates(like *) due to this i am not able to display the data into flat file.it's displaying the some of junk data into the flat file.
source dataExample:
Address1="XDERFTG * HYJUYTG"
how to remove the special charates in a string (2 Replies)
Hi,
I have a file with this line, it's always in the first line:
I want to remove these special characters: ´╗┐
file1
´╗┐\\bar\c$\test2\;3.348.118 Bytes;160 ;3
\\bar\c$\test\;35 Bytes;2 ;1
I want the same file to be only
\\bar\c$\test2\;3.348.118 Bytes;160 ;3
\\bar\c$\test\;35... (4 Replies)
Hi,
I have string like this ="Lookup Procedure"
But i want the output like this Lookup Procedure
=," should be removed.
Please suggest me the solution.
Regards,
Madhuri (2 Replies)
Hi Gurus,
I have file which contains some unicode charachator like "ü". I want to replace it with some charactors. I searched in internet and got command sed "s/ü/-/g", but I don't know how to type ü in unix command line.
Please help me for this one.
Thanks in advance (7 Replies)
Perl::Critic::Policy::RegularExpressions::ProhibitCompleUsereContributed PerlPerl::Critic::Policy::RegularExpressions::ProhibitComplexRegexes(3pm)NAME
Perl::Critic::Policy::RegularExpressions::ProhibitComplexRegexes - Split long regexps into smaller "qr//" chunks.
AFFILIATION
This Policy is part of the core Perl::Critic distribution.
DESCRIPTION
Big regexps are hard to read, perhaps even the hardest part of Perl. A good practice to write digestible chunks of regexp and put them
together. This policy flags any regexp that is longer than "N" characters, where "N" is a configurable value that defaults to 60. If the
regexp uses the "x" flag, then the length is computed after parsing out any comments or whitespace.
Unfortunately the use of descriptive (and therefore longish) variable names can cause regexps to be in violation of this policy, so
interpolated variables are counted as 4 characters no matter how long their names actually are.
CASE STUDY
As an example, look at the regexp used to match email addresses in Email::Valid::Loose (tweaked lightly to wrap for POD)
(?x-ism:(?:[^( 40)<>@,;:".\[] 00- 37x80-xff]+(?![^( 40)<>@,;:".\[]
00- 37x80-xff])|"[^\x80-xff
15"]*(?:\[^x80-xff][^\x80-xff
15
"]*)*")(?:(?:[^( 40)<>@,;:".\[] 00- 37x80-xff]+(?![^( 40)<>@,;:".\[
] 00- 37x80-xff])|"[^\x80-xff
15"]*(?:\[^x80-xff][^\x80-xff
15"]*)*")|.)*@(?:[^( 40)<>@,;:".\[] 00- 37x80-xff]+(?![^( 40)<>@,
;:".\[] 00- 37x80-xff])|[(?:[^\x80-xff
15[]]|\[^x80-xff])*]
)(?:.(?:[^( 40)<>@,;:".\[] 00- 37x80-xff]+(?![^( 40)<>@,;:".\[] 00
- 37x80-xff])|[(?:[^\x80-xff
15[]]|\[^x80-xff])*]))*)
which is constructed from the following code:
my $esc = '\\';
my $period = '.';
my $space = '