RegEx: how to find whether a text begins with currency symbols? -
I would like to test whether a given text begins with some currency symbols, such as how to get $ ¥ That use regex
depending on your language, but some ^ [\ $] < P>
[]
A character matches the inside of the group.
You \ $
because $
-sign has a special meaning in regexps sometimes
. *
Matches "Everything Else" (except for a new line).
EDIT: After reading your question again: If you really want to match some currency symbols (probably more than one), try ^ [ \ $ € £ ¥] +. *
Comments
Post a Comment