I am new to regex. I need a regex for JavaScript code that allows special character * in the beginning of text input, but not anywhere else in the text.
example : it should allow *text, it should not allow *text*abcd
I would need a similar regex for PHP as well.
I have tried using "/^\s*/", but this doesn't work. Anyways I dont have anyidea of regex. I have started learning it.
Thanks Dora