Questions tagged [non-alphanumeric]

65 questions
3
votes
1 answer

Replace all non-alphanumeric with a period

I am trying to rename all of these atrocious column names in a data frame I received from a government agency. > colnames(thedata) [1] "Region" "Resource Assessment Site ID" [3] "Site…
Katie S
  • 89
  • 7
3
votes
2 answers

sed: remove all non-alphanumeric characters inside quotations only

Say I have a string like this: Output: I have some-non-alphanumeric % characters remain here, I "also, have_+ some & .here" I want to only remove non-alphanumeric characters inside the quotations except commas, periods, or spaces: Desired…
2
votes
3 answers

Remove all characters except alphabets and numbers from a C# "Unicode" string

Removing non-alphanumeric characters from a string is simple work. For example: StringBuilder sb = new StringBuilder(); foreach(var c in s) { if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9')) …
user13239154
2
votes
0 answers

Trouble with tabulizer library in r recognizing non-alphanumeric (symbol) characters on a table in a PDF

I am using the tabulizer library in r to capture data from a table located inside a PDF on a public website (https://www.waterboards.ca.gov/sandiego/water_issues/programs/basin_plan/docs/update082812/Chpt_2_2012.pdf). The example table that I am…
2
votes
2 answers

How to drop and keep only certain non alphanumeric characters?

I Have df that looks like this: email id {'email': ['test@test.com']} {'id': ['123abc_d456_789_fgh']} when I drop non alphanumeric characters like so: df.email = df.email.str.replace('[^a-zA-Z]',…
RustyShackleford
  • 3,462
  • 9
  • 40
  • 81
2
votes
1 answer

find the first occurrence of non-alphanumeric character in a string

I know that i could use strpos to find the first occurrence of a string. But is it possible to find the first occurrence of a character that is not an alphabetic character or number. For example: strpos2('hello world') => 5 strpos2('hi!you') => 2
Moradnejad
  • 3,466
  • 2
  • 30
  • 52
2
votes
3 answers

How do I create a Perl regex that matches non-alphanumeric characters except spaces?

I have a Perl regex /\W/i which matches all non-alphanumeric characters, but it also matches spaces which I want to ignore. How do I get it to match non-alphanumeric characters except spaces?
Joe Schmoe
  • 563
  • 3
  • 6
  • 8
2
votes
1 answer

Why does Membership.GeneratePassword give me Nonalphanumeric when I specifiy 0?

I used Membership.GeneratePassword(10, 0) in my C# application code. The GeneratePassword method Generates a random password of the specified length. The second argument specifies the the minimum number of non-alphanumeric characters (such as…
crazyTech
  • 1,379
  • 3
  • 32
  • 67
1
vote
0 answers

Teradata REGEXP to find all non-alpha characters

The HISTORY_MEMBERS table has undesireable entries in the some of the columns. The majority are in the Last_Name column. Some entries were made for testing (TestLastName, test, tester, etc.) and others have non-alpha characters (!, ., /, 9, etc.)…
DLPP
  • 11
  • 1
1
vote
1 answer

Read non alphabetic character using pandas from excel

I am trying to read this file using pandas in UTF-8 encoding. English alphabetic characters are read properly but those characters which are not English alphabet are not read properly. I tried reading by changing encoding from utf8 to cp1252, ASCII…
1
vote
1 answer

How to make padding spaces results of a similar length when using non alphanumeric characters?

I am using javascript, and I want the output of the following console.log() to be of a same length. const str1 = 'English'; console.log(str1.padEnd(10, '.')); const str2 = '日本語'; console.log(str2.padEnd(10, '.')); However, the current output is…
philippos
  • 1,142
  • 5
  • 20
  • 41
1
vote
1 answer

Adding columns to dataframe that show boolean based on column data type in python

I'm trying to add columns to the dataframe that are booleans based on a determination of whether the current column being iterated through is alphanumeric, alphabetical, or numerical. Unfortunately, each of the columns are giving False for each of…
1
vote
1 answer

python 3 regex string matching ignore whitespace and string.punctuation

I am new to regex and would like to know how to pattern match two strings. The use case would be something like finding a certain phrase in some text. I'm using python 3.7 if that makes a difference. phrase = "some phrase" #the phrase I'm searching…
1
vote
7 answers

filter non-alphanumeric "repeating" characters

What's the best way to filter non-alphanumeric "repeating" characters I would rather no build a list of characters to check for. Is there good regex for this I can use in PHP. Examples: ........... ***************** !!!!!!!! ###########…
isuelt
  • 333
  • 1
  • 4
  • 10
1
vote
0 answers

SQL Sever 2012+ to return non-alphanumeric characters, excluding spaces

Ok, have tried [^a-zA-Z0-9], [^a-zA-Z0-9 ] (LIKE OR NOT LIKE), as well as PATINDEX('%[^a-zA-Z0-9]%',mycol) > 0 None of these exclude spaces and therefore always return valid entries- I want only those with non-numeric, non-alpha, and non-space. I…
A G A
  • 11
  • 3