square-bracket

mySQL Regexp with square brackets

I am trying to match strings like '[sometext<someothertext>]' (i.e., left square bracket, text, left angle bracket, text, right angle bracket, right square bracket) within a column in mySQL. Originally I used the following query (notice that since regex queries are escaped twice in mySQL, you must use two backslashes where you would norm...

how to find a string containing a square bracket?

i'm using a regular expression to search for a bunch of keywords in a text. All keywords are found but one: [DAM]Berlin. I know it contains a square bracket so i escaped it, but still, no luck. What am i doing wrong? here is my php code. The text to search for keywords: $textToSearch= '<p><br> Time ¦ emit LAb[au] <br> <br> [DAM]Berli...

Regular expression to grab link between square brackets

I need to lift the YouTube link from some text which looks like this: [youtube=http://www.youtube.com/v/qpbAe2HyzqA&hl=en&fs=1&] Can anyone help? ...

accessing array values without square brackets in php

In php how can I access an array's values without using square brackets around the key? My particular problem is that I want to access the elements of an array returned by a function. Say function(args) returns an array. Why is $var = function(args)[0]; yelling at me about the square brackets? Can I do something like $var = funct...

javascript regular expression followed by open square bracket

text = text.replace(/\.(?=[a-zA-Z0-9\[])/g, "<span style='background-color: #FF00FF'>.</span>"); I want to use javascript to highlight all full stops that is followed by letters, numbers and [. The above expression works for letters and numbers, but not bracket. Any idea what's wrong? ...

What do the square brackets in LaTeX logs mean?

I'm currently working on a parser that reads complete LaTeX logs. Most of the log format is, though weird, easy to figure out, but these square brackets are puzzling me. Here's an example from near the end of one of my logs: Overfull \hbox (10.88788pt too wide) in paragraph at lines 40--40 []$[]$ [] [102]) [103] Kapitel 14. (./Thermo...

"with" scope and properties with square bracket notation

Is it possible to access object properties that can only be accessed with the square bracket notation when inside a "with" statement. Example: var o = { "bad-property": 1, "another:bad:property": 2, "goodProperty": 3 }; with(o) { console.log(goodProperty); // works awesome console.log(???) // how to access "bad:property"? } ...

Braces: [Brackets], (Parentheses) & {Curlies} in Ruby & Rails

So the loose tolerance of Ruby to use braces sometimes and not REQUIRE them has led to alot of confusion for me as I'm trying to learn Rails and when/where to use each and why? Sometimes parameters or values are passed as (@user, @comment) and other times they seem to be [ :user => comment ] and still others it's just: :action => 'edit'...

What does square brackets in CSS class names means ?

I saw here square brackets that are used in class names: <input class="validate[required,custom[onlyLetter],length[0,100]]" name="firstname" type="text" /> What does this means ? ...

Javascript can't find strings containing square brackets

Hi everybody, I'm using this function that helps my webdevelopers to find a piece of code in a webpage: function findString (str) { var strFound; strFound=self.find(str); if (strFound && self.getSelection && !self.getSelection().anchorNode ){ strFound=self.find(str); } if (!strFound) { strFound=self.find(str,1,1) ...

How do i store a set of values in an array without using square brackets, but by using pointers

In C programming, how can a store a set of values entered by the user into an array using only pointers and no square brackets? ...