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

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -