Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7584605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T18:57:48+00:00 2026-05-30T18:57:48+00:00

I have a string such as Value = $val$ and I want to replace

  • 0

I have a string such as “Value = $val$” and I want to replace $val$ with some value like “$0.00”

so final string can look like “Value = $0.00”

This works in firefox and IE 7 and IE 8 but does not work in IE 9 any idea why? and how I can resolve the issue?

Any value other than $0.00 (e.g.$5.00) works without any issue.


http://jsfiddle.net/jhdVV/5/

edit: updated link with a textbox and a button to test with diff values.

http://jsfiddle.net/jhdVV/10/

In IE 9 I am getting “Value =$val$.00”

Browser is in Standards mode.

Note:
I am working on legacy code so , ideally I would like to stay away from tempting jquery solutions.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T18:57:50+00:00Added an answer on May 30, 2026 at 6:57 pm

    The $0 in your replacement text is essentially an uninitialized variable, the behavior of which is undefined. So, escape the dollar sign:

    $$0.00
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to replace a string such as: <input type=hidden name=id value=12345 /> but
I have a string such as big bad dog, how can I get an
Lets say a have a string such as this one: string txt = Lore
I have a string read from another source such as \b\bfoo\bx. In this case,
I have a string, such as this: $foo = 'Hello __(How are you) I
I have written this code to convert string in such format 0(532) 222 22
I have a string such as 'xxox-x' that I want to mask each line
If you have a string like this volume-7,notcontact-xxxx,not_lightlevel-1280.0, and this string could vary with
I have a string with a value such as <select name=id></select> . As I'd
If I have a string such as lotsofcrapsomethingimportantmoreotherstuff is it possible to get Regex

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.