Menu
Newbedev LogoNEWBEDEV Python Javascript Linux Cheat sheet
Newbedev LogoNEWBEDEV
  • Python 1
  • Javascript
  • Linux
  • Cheat sheet
  • Contact

Regular expression to check special symbols not working in lightning javascript

Try using the constructor syntax.

I've verified that this saves in lightning:

var regularExpression; 
var re = new RegExp('[-!$%^&*()_+|~=`{}\[\]:";\'<>?,.\/]');

Note the escape of the ' char within the expression.

Tags:

Javascript

Validation

Lightning

Regular Expressions

Lightning Aura Components

Related

What happened to Salesforce Technical Architect journey books? Communicating between Lightning component and VF Page Custom field in Lightning Component expression replaced with "unknown_custom_field" in some production orgs Map behaviour populating with List Installing an appexchange app into a scratch org Is the source code for the sfdx tools available? Does LAST_N_DAYS:1 Include TODAY? Service methods in Lightning Components Database.upsert - how to find which records have inserted/updated based on ExternalId Which API versions are still supported? How to enable Account History Tracking in Scratch Org? Developerforce's workbench site can’t be reached

Recent Posts

Pandas how to find column contains a certain value Recommended way to install multiple Python versions on Ubuntu 20.04 Build super fast web scraper with Python x100 than BeautifulSoup How to convert a SQL query result to a Pandas DataFrame in Python How to write a Pandas DataFrame to a .csv file in Python
© 2021 newbedevPrivacy Policy