|
|
Browse by Tags
All Tags » javascript regular expressions
Showing page 1 of 2 (19 total posts)
-
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) {
# ...
-
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 ...
-
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 ...
-
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' + ...
-
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 ...
-
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 ...
-
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 ...
-
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 ...
-
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>
-
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>
...
1
|
|
|