Login
Register
Search
Home
Forums
Jobs
LawsonGuru
LawsonGuru Letter
LawsonGuru Blog
Worthwhile Reading
Infor Lawson News Feed
Store
Store FAQs
About
Forums
Integration / Customization
IPA/ProcessFlow
Java to remove non-alpha characters
Home
Forums
Jobs
LawsonGuru
LawsonGuru Letter
LawsonGuru Blog
Worthwhile Reading
Infor Lawson News Feed
Store
Store FAQs
About
Who's On?
Membership:
Latest:
Jeffin Joy
Past 24 Hours:
0
Prev. 24 Hours:
0
Overall:
4988
People Online:
Visitors:
128
Members:
0
Total:
128
Online Now:
New Topics
Top Forum Posters
Name
Points
Greg Moeller
4184
David Williams
3349
Kat V
2984
Woozy
1973
Jimmy Chiu
1883
Kwane McNeal
1437
Ragu Raghavan
1377
Roger French
1315
mark.cook
1244
Chris Martin
825
Forums
Filtered Topics
Unanswered
Unresolved
Active Topics
Most Liked
Most Replies
Search Forums
Advanced Search
Prev
Next
Forums
Integration / Customization
IPA/ProcessFlow
Java to remove non-alpha characters
Please
login
to post a reply.
2 Replies
0
Subscribed to this topic
53 Subscribed to this forum
Sort:
Oldest First
Most Recent First
Author
Messages
MC
Advanced Member
Posts: 41
New Poster
Congrats on posting!
2/13/2014 2:03 PM
I need a Java routine that I can put in to my PF to remove the non a-z charaters (upper and lower) from the employee name and compress the remaing good characters into a string.
Kyle Jorgensen
Veteran Member
Posts: 122
New Poster
Congrats on posting!
2/13/2014 2:31 PM
Split
I presume you mean javascript.
Use the string replace method combined with a regular expression.
See www.w3schools.com for a very easy to navigate and thorough reference to the javascript language.
[CODE] var strString = "My Name"; var strJustUppers = strString.replace(/[a-z]/g,""); // replace lower case letters with nothing var strJustUppers = strJustUppers.replace(/\s/g,""); // replace spaces with nothing [CODE]
After the code above execute, the variable strJustUppers should have the value of "MN".
MC
Advanced Member
Posts: 41
New Poster
Congrats on posting!
2/18/2014 1:22 PM
Split
thanks so much, I was able to use this:
AlphaLastName.replace(/[^a-zA-Z]/,"") it is more than just spaces, need to get rid of dash..apostrophe and all the 'funky' characters in the last name
Please
login
to post a reply.