regexp question

You’ll need to be more specific – one example doesn’t give enough
information about the format.

But it could be like this:

/copyGreenBold>([:alpha:])+s+([:digit:])+:s*([:upper:]+)/

Possibly with some linebreak-swallowing machinery, bearing in mind
that (i) all regexp implementations are slightly different (I’ve been
using Perl and Java regex more recently than Max) and (ii) my regexp
chops are pretty rusty and (iii) your input syntax isn’t specified; so
consider this a starting point, and do a LOT of testing.

It’s like the old joke: you have a problem, so you come up with a
regexp to solve it. You now have two problems.

Good luck with your gambling application.

– N.

Nick Rothwell / Cassiel.com Limited
http://www.cassiel.com
http://www.myspace.com/cassieldotcom
http://www.last.fm/music/cassiel
http://www.reverbnation.com/cassiel
http://www.linkedin.com/in/cassiel
http://www.loadbang.net

#145363
Nov 20, 2008 at 11:46am

regexp question

hi, i

#40947
Nov 20, 2008 at 12:13pm

http://www.python.org/doc/2.5.2/lib/re-syntax.html

tells all you need. takes some time to understand, though.

good luck!

jrp

#145362
Nov 20, 2008 at 12:14pm

On 20 Nov 2008, at 11:46, niki wrote:

>

Seat
> 1:

> AEKARAS
> ($93
> in
> chips)
>
> and i want to get “Seat” “1″ “AEKARAS”
Nov 20, 2008 at 3:06pm

This regex parses the example that you gave but without knowing more about the task you want to achieve in general it might not help so much.

It looks for the string ““. then it returns any characters up until “

#145364
Nov 20, 2008 at 5:08pm

thx very much, that worked perfect on the files (it

#145365
Nov 20, 2008 at 5:16pm

The [regexp] helpfile and documentation aren’t particularly extensive. I’ve found http://www.regular-expressions.info very helpful, especially the tutorials. The mozilla javascript regex page is also quite good. If all else fails I go trial and error bit by bit through the regex checking that it is returning what i expect it to be at each stage and modifying the re: if it isn’t.

lh

#145366

You must be logged in to reply to this topic.