-1

I would like to get the regular expression of this kind of expressions

title="+34 952387749
title="+34 123456789

But I've got a problem with the space and +. As far I got this piece of code but I don't find how to express the space and +

^title="+34' space  [0-9]{9}

Many thanks for your help !

The fourth bird
  • 154,723
  • 16
  • 55
  • 70
nicolashp
  • 29
  • 5

3 Answers3

0

You need backslashed to specify that you specifically want to search for the +. Your regex would be:

\+34 [0-9]{9}
Carsten
  • 2,765
  • 1
  • 13
  • 28
0

Escape the special characters like space and + using . In RegEx, space is denoted by "\s". RegEx for your expression would be:

\+34\s\d{9}

\d is used to denote digit.

0

Try use this regex:

 ^title="\+\d{2} \d{9}$