Meaning, I want to match:
$10
or
$
but not this:
${name}
or:
$image{http://wrfgadgadga.com/gadgad.png}
I also want to match everything else... normal characters, symbols, numbers, etc.
Matching everything but things that start with $ is easy. It's like this:
def literalCharacter: Parser[String] = """[^\$]""".r
I've tried the regular expression look-ahead syntax using (?!i) or (?!{) in numerous combinations but I can't seem to get it to work. I've also tried rewriting it with the = instead of the ! like this: (?=i)
Basically, I've tried injecting these look-aheads in every way I can image with the [^\$] expression and I can't get it work.
Help?
EDIT: Hrm, this seems to work:
[^\$]|\$(?!i)|\$(?!\{)