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 All,
I have a script written that creates a new directory within the shell program and if a parameter isn't passed in, it creates a strange directory name by mistake. So I have a directory like "-_12" and I am unable to remove it. I tried removing it using double quote and many others. I have... (12 Replies)
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)
hello all
I am writing a perl code and i wish to remove the special characters for text.
I wish to remove all extended ascii characters. If the list of special characters is huge, how can i do this using substitute command
s/specialcharacters/null/g
I really want to code like... (3 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 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)
Discussion started by: ken6503
7 Replies
LEARN ABOUT PHP
geoip_region_name_by_code
GEOIP_REGION_NAME_BY_CODE(3) 1 GEOIP_REGION_NAME_BY_CODE(3)geoip_region_name_by_code - Returns the region name for some country and region code comboSYNOPSIS
string geoip_region_name_by_code (string $country_code, string $region_code)
DESCRIPTION
The geoip_region_name_by_code(3) function will return the region name corresponding to a country and region code combo.
In the United States, the region code corresponds to the two-letter abbreviation of each state. In Canada, the region code corresponds to
the two-letter province or territory code as attributed by Canada Post.
For the rest of the world, GeoIP uses FIPS 10-4 codes to represent regions. You can check http://www.maxmind.com/app/fips10_4 for a
detailed list of FIPS 10-4 codes.
This function is always available if using GeoIP Library version 1.4.1 or newer. The data is taken directly from the GeoIP Library and not
from any database.
PARAMETERS
o $country_code
- The two-letter country code (see geoip_country_code_by_name(3))
o $region_code
- The two-letter (or digit) region code (see geoip_region_by_name(3))
RETURN VALUES
Returns the region name on success, or FALSE if the country and region code combo cannot be found.
EXAMPLES
Example #1
A geoip_region_name_by_code(3) example using region code for US/Canada
This will print the region name for country CA (Canada), region QC (Quebec).
<?php
$region = geoip_region_name_by_code('CA', 'QC');
if ($region) {
echo 'Region name for CA/QC is: ' . $region;
}
?>
The above example will output:
Region name for CA/QC is: Quebec
Example #2
A geoip_region_name_by_code(3) example using FIPS codes
This will print the region name for country JP (Japan), region 01.
<?php
$region = geoip_region_name_by_code('JP', '01');
if ($region) {
echo 'Region name for JP/01 is: ' . $region;
}
?>
The above example will output:
Region name for JP/01 is: Aichi
PHP Documentation Group GEOIP_REGION_NAME_BY_CODE(3)