Regular expressions

  • 30 June 2015
  • 1 reply
  • 3 views

Badge +1

Hi, I'm new to using regular expressions. Can anyone suggest a regular expression I can use to extract the numbers from the following: 7;#Gender;#3;#Location eg. 7, 3


1 reply

Userlevel 6
Badge +16

If your input is 7;#Gender;3;#Location

 

You could use the function named "replace", using the regular expression (;[a-z])w+  and replace it with and empty string ""

 

I have created a sample here >>> RegExr: Learn, Build, & Test RegEx

 

Remember to experiment your regular expressions on regexr.com

Reply