Mal: There's plenty orders of mine that she didn't obey. Wash: Name one! Mal: She married you!

'War Stories'


Buffistechnology 3: "Press Some Buttons, See What Happens."

Got a question about technology? Ask it here. Discussion of hardware, software, TiVos, multi-region DVDs, Windows, Macs, LINUX, hand-helds, iPods, anything tech related. Better than any helpdesk!


vw bug - May 02, 2012 6:24:09 am PDT #19950 of 25501
Mostly lurking...

My fellow Wordpressers who know more than me, I've turned off trackbacks and pingbacks, but I'm still getting a million a day. Am I missing something?


Jon B. - May 02, 2012 6:35:19 am PDT #19951 of 25501
A turkey in every toilet -- only in America!

dot org or dot com?


vw bug - May 02, 2012 7:01:13 am PDT #19952 of 25501
Mostly lurking...

dot org. It's on my meekmanor site.


tommyrot - May 02, 2012 7:37:24 am PDT #19953 of 25501
Sir, it's not an offence to let your cat eat your bacon. Okay? And we don't arrest cats, I'm very sorry.

Is there anyone around who can create a regular expression for me?

I have data that looks like this:

SMITH, JOHN (1949)

I need a regular expression to return the number inside the parenthesis. Otherwise, I can just do it without a regular expression.


Tom Scola - May 02, 2012 7:39:21 am PDT #19954 of 25501
Remember that the frontier of the Rebellion is everywhere. And even the smallest act of insurrection pushes our lines forward.

What language are you writing the regular expression in? PHP?


tommyrot - May 02, 2012 7:42:00 am PDT #19955 of 25501
Sir, it's not an offence to let your cat eat your bacon. Okay? And we don't arrest cats, I'm very sorry.

Javascript. Using a string object.


Tom Scola - May 02, 2012 7:48:38 am PDT #19956 of 25501
Remember that the frontier of the Rebellion is everywhere. And even the smallest act of insurrection pushes our lines forward.

a = s.match("\\\\(\\\\d+\\\\)")

Where a is either null or an array containing the result.


tommyrot - May 02, 2012 7:58:01 am PDT #19957 of 25501
Sir, it's not an offence to let your cat eat your bacon. Okay? And we don't arrest cats, I'm very sorry.

Thanks!

Any way to do this without returning the parenthesis?


Tom Scola - May 02, 2012 7:59:08 am PDT #19958 of 25501
Remember that the frontier of the Rebellion is everywhere. And even the smallest act of insurrection pushes our lines forward.

I think "\\\\((\\\\d+)\\\\)" will work.


tommyrot - May 02, 2012 8:02:08 am PDT #19959 of 25501
Sir, it's not an offence to let your cat eat your bacon. Okay? And we don't arrest cats, I'm very sorry.

Almost. I get something like (2104),2104