Got more questions? Find advice on: ASP | SQL | XML | Windows
in Search
Welcome to RegexAdvice Sign in | Join | Help

Browse by Tags

All Tags » javascript regular expressions
Showing page 1 of 2 (19 total posts)
  • Stripping Logging Statements in JavaScript

    Hi there, I'm using Perl regular expressions to try to find logging statements in my compressed JavaScript code and strip them out of my code. Here's what my regular expression looks like at the moment:          foreach my $line (@file_lines) {             # ...
    Posted to Construction Advice (Forum) by seanoshea on August 14, 2008
  • Re: Reading specific values from string:

    I used now your excellent tester at myregextester.com and my best result is:Source text:source_string_to_KEY1:VALUE1_match_with_pattern_KEY2:VALUE2 Raw Match Pattern: (?=KEY1:([^_]*))$matches Array: ( [0] => [1] => VALUE1 )This solution does'nt work with IE6 (below JS 1.5) But I'm looking for something ...
    Posted to Construction Advice (Forum) by mocambo on August 10, 2008
  • Re: Reading specific values from string:

    Thank you for your assistance ! More specific goal is find VALUE knowing a KEY from STRING. sampleString =  "source_string_to_KEY1:VALUE1_match_with_pattern_KEY2:VALUE2" So for example I need to capture (only) VALUE1 when i know only KEY1 from that sampleString. Key:Value pairs are with colon-separated form. All words are ...
    Posted to Construction Advice (Forum) by mocambo on August 10, 2008
  • Reading specific values from string:

    I'm trying to read some specific values from a string. elementName = "item add item:mk0090 destination:project1";  You can see there two  key:value  pairs. How can I find this value knowing an key ? Matching 'item:mk0090' or 'destination:project1' is easy: elementID.match( '/\b' + ...
    Posted to Construction Advice (Forum) by mocambo on August 9, 2008
  • hash and args

    greetings,    in javascript, i'm trying to pull out pieces of a url via regex. my url looks like this:   http://domain.com/index.html#hash=http://domain.com/index.php?arg=val&arg2=val2&meta=val&meta2=val   I want to be able to extract everything after hash= up until meta=. but i want it to go to meta= if ...
    Posted to Construction Advice (Forum) by trashman on July 21, 2008
  • Parse param from Query String

    I'm trying to parse a Parameter value from the Query String in JavaScript E.g URLs:  http://www.contoso.com?key1=value1&key2=value2 http://www.contoso.com?&key2=value2&key1=value1  [window.location.search.substring(0) in JS automatically return portion after '?' so i just need to parse out the ...
    Posted to Construction Advice (Forum) by ananded on June 26, 2008
  • Find/Replace but ignore HTML tags

    Hi, I've got a javascript/regex scenario I was hoping to find a solution to.  Here’s the situation  We have been given the string "The quick brown fox jumped over the lazy sleeping dog." We want to replace it with "The large yellow tiger jumped over the lazy sleeping cat".  Normally this would ...
    Posted to Construction Advice (Forum) by beng on May 25, 2008
  • Parse SQL in Javascript or PHP

    Hello all, new to this community. Having some difficulties getting a regex to parse a standard SQL query. It make it simple I will just answer the bullet points from the 'READ FIRST' post. 1.  Programming language used - Javascript (or if PHP is easier is accomplish this task, that can be done too) 2. My ultimate task is to create ...
    Posted to Construction Advice (Forum) by rootsage on February 22, 2008
  • Regex to strip everything except <h3>, <h4> and <h5> tags and the text within these tags

    Regex to strip everything except <h3>, <h4> and <h5> tags and the text within these tags Platform: javascript Input: <div><p>Some text</p><h3><a href ="#">link text here</a></h3></div> Output: <h3>link text here</h3>
    Posted to Construction Advice (Forum) by pritesh on November 30, 2007
  • Regex to strip everything except <h3>, <h4> and <h5> tags and the text within them

    Hi,  I was looking for a regex which would strip all HTML and included text except what is included in <h3>,<h4> and <h5> tags. I am planning to use this regex in javascript.    example:   Input: <ul>       <li><h4>Sub Menu</h4>    ...
    Posted to Construction Advice (Forum) by pritesh on November 30, 2007
1 2 Next >