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 9221883
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:40:46+00:00 2026-06-18T03:40:46+00:00

I’ve seen some posts about JSLint bad escapement warnings, but I just wanted to

  • 0

I’ve seen some posts about JSLint “bad escapement” warnings, but I just wanted to see if I’m doing this Regex correctly. (Note – I’m dabbler programmer).

I have a function (below) that attempts to parse out a variable from it’s name in a long message. The regex is working well, but should I change something in response to the JSLint warning?

A very simplified version of msg could look like this essentially:

VariableName1 = Value1
VariableName2 = Value2
VariableName3 = Value3

The actual msg has different unstructured data above and below. I had to use a strange Regex since even though a more simple one worked on all the testing websites, it didn’t work within the server application we are using, so this is the only way I could get it to work. The regular expression incorporates a variable.

Here is the parsing function I’m using:

    function parseValue(msg, strValueName) {
        var myRegexp = new RegExp(strValueName + ' = ([A-Z3][a-zA-Z\. 3]+)[\\n\\r]+', 'gm');
        log('parseValue', 'myRegexp = ' + myRegexp.toString());
        var match = myRegexp.exec(msg);
        log('parseValue', 'returning match = ' + match[1] );
        return match[1];
    }

There is probably something much simpler that a ‘real’ programmer can come up with pretty easily. Any help would be appreciated.

THanks.

  • 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-06-18T03:40:48+00:00Added an answer on June 18, 2026 at 3:40 am

    The problem that JSLint didn’t like was the ‘.’ character in the character class as pointed out by ‘Explosion Pills’.

    When I removed the ‘.’ all was good.

    Thanks.

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

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
This could be a duplicate question, but I have no idea what search terms
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into

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.