I have the following RegEx
id=(.*?) | id="(.*?)"
The reason for this is I am trying to replace Ids from the browsers DOM using JavaScript. IE, however strips quotes from element atributes as ... |
I think I must just be really tired, because this should be really simple, but it's just not working for me. I want to match a portion of a string using ... |
I have a string, such as hello _there_. I'd like to replace the two underscores with <div> and </div> respectively, using javascript. The output would (therefore) look like hello <div>there</div>. The ... |
When i write a regular expression like:
m = /(s+).*?(l)[^l]*?(o+)/.exec( "this is hello to you" )
console.log( m );
I get a match object containing the following:
{
0: "s is hello",
...
|
I have a question for a Javascript regex ninja: How could I simplify my variable creation from a string using regex grouping? I currently have it working without using any grouping, ... |
I'm attempting to integrate John Gruber's An Improved Liberal, Accurate Regex Pattern for Matching URLs into one of my Javascripts, but WebKit's inspector (in Google Chrome 5.0.375.125 for Mac) ... |
re = /\/?(\w+)\/(\w+)/
s = '/projects/new'
s.match(re)
I have this regular expression which I will use to sieve out the branch name, e.g., projects, and the 'tip' name, e.g., new
I read that one can ... |
|
I want to be able to detect/pick apart strings like :
tickets at entrance per person
ballons pp
tree planting
i.e. a description followed by an optional "pp" or ... |
Ok the question is quite simple.
I'm looking for a string like this one :
name="some_text_0_some_text"
I have HTML code before and after the string above.
Now i would like to replace the 0 by ... |
I have the following regular expression:
/(?<={index:)\d+(?=})/g
I am trying to find index integer in strings like this one:
some text{index:1}{id:2}{value:3}
That expression works fine with php, but it doesn't work in javascript, I get ... |
I need to implement a RegExp in Javascript that allows me to match the following categories and items, associating the items to their proper category, but I don't know how:
<table>
...
|
I'm wondering if it is possible to exclude part of a match within a group.
I believe that /(foo((?:bar)|(bad)))/ results in matching "foobar" or "foobad" and group 1 containing "foobar" or "foobad". ... |
I want to split string
"abcdefgh"
to
"ab","cd","ef","gh"
using javascript split()
"abcdefgh".split(???)
Can you please help ?
|
Because of the way that jQuery deals with script tags, I've found it necessary to do some HTML manipulation using regular expressions (yes, I know... not the ideal tool for the ... |
If I have a string... abcdefghi
and I want to use regex to load every elemnent into an array but I want to be able to stick anything connected by plus sign ... |
I was just playing with the native replace method for strings in javascript. Is there any thing like groups of groups. If not, how are groups ordered in string where a ... |
Given the JavaScript following code
var patter = /abc(d)e/
var somestring = 'abcde'
var index = somestring.match(patter)
I would like to know the start index of a group match, just like in java |
I have following code:
this.parse = function(whatToParse, currentItem) {
var re = /\{j\s([a-z0-9\.\|_]+)\ss\}/gi;
var newResult = whatToParse.replace(re, function(matches){
alert(matches);
...
|
I'm trying to do the same thing that this guy is doing, only he's doing it in Ruby and I'm trying to do it via Javascript:
Split a string into an ... |
I'm attempting to get any words starting with @, such as in "@word", but only get the "word" value.
My sample text is:
@bob asodija qwwiq qwe @john @cat asdasd@qeqwe
My current regex ... |
|