Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Check If first character is "+"

Tags:

regex

tasker

How can i detect string is start with "+"

I tried
^\s*?\+.*$
but no help.

P.s: I have only one line alltime.

like image 915
Black White Avatar asked Jun 18 '15 19:06

Black White


1 Answers

You don't need \s*?, you have to use:

^\+
or...
^[+]

In case you want to check a complete string, you can use:

^\+.*$

Working demo

like image 68
Federico Piazza Avatar answered Sep 20 '22 00:09

Federico Piazza