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

paypal - How to know the URL referrer in PHP? -

oauth - Facebook OAuth2 Logout does not remove fb_ cookie -

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -