There is a string variable containing number data , say $x = "OP/12/DIR"; . The position of the number data may change at any circumstance by user desire by modifying it inside the application , and the slash bar may be changed by any other character ; but the number data is mandatory. So how to extract the number data from the string ?
There is a string variable containing number data , say $x = OP/12/DIR; .
Share
Replace everything that is NOT a number with an empty string.