Skip to content
Advertisement

Custom Regular Expressions [closed]

How is it possible to use regex to separate

JavaScript

into BCT343 format? I am using this for magento to break 2 types of serial number ie BCT34385Z0000N07518Z and BCT34395Z0000N07518Z into regex to just identified the first 6 characters ie BCT343.

Advertisement

Answer

This is very bad practice, but because you asked for it:

JavaScript

or if you want an if statement:

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement