@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7



Comments:

<0> this makes no sense
<1> can you print ln the elements please
<0> which ones
<0> it screws me up if I println inside the loop
<0> its too much to print
<0> my comp freezes
<1> hmmm
<0> I think we are doing it backwards
<0> The matcher should be formularies_lsit (drugname)
<0> the regexp = database
<0> so if matcher.matches
<0> that would make more sense
<1> no
<0> ok
<0> well, somewhere our syntax is off
<1> matcher = pattern.matcher((String)registry_list.get(x));



<1> you're trying to match the pattern
<0> ok
<1> to the string you have
<0> ok
<1> so its pattern.match
<0> RESULT: 0
<0> FORMULARY: 404
<0> RATIO: 0.0%
<1> the pattern is hte drug name
<0> well its giving me nothing
<0> regexp = ""+(String)formularies_list.get(y)+"";
<0> when I use that
<1> regexp = "\\*"+(String)formularies_list.get(y)+"\\*";
<1> try that one
<0> still 0 results
<1> regexp = "\\*"+(String)formularies_list.get(y)+"\\*$";
<0> same thing
<0> .\*PROMETRIUM\*$
<0> is wht it prints
<0> without the leading .
<0> when I println(regexp)
<0> it prints all of them tho..
<0> in that format
<0> but when I print out pattern
<0> it shows same thing
<0> so i think pattern.compile isn't working
<0> java.util.regex.Matcher[pattern=\*ZOCOR\*$ region=0,21 lastmatch=]
<0> ok man
<0> regexp = "(.*)("+(String)formularies_list.get(y)+")(.*)$";
<0> gives me results
<0> but it still doesn't solve the cialis/specialist problem
<0> and its very slow to run
<0> Can I have multiplle regexp lines?
<1> yes
<0> cool
<0> ok, well I've got it working better now
<0> whats the whitespace char?
<0> for regex..
<0> \\s ?
<1> s
<0> k
<1> yes
<0> alright thanks
<0> i think im good to go from here
<1> asds: i dont htink so
<0> what about a "
<0> what do you mean?
<1> asds: get a regex tutorial
<0> regexp = "(.*)(\\.|\\-|,|\\(|\\)("+(String)formularies_list.get(y)+")(.*)$";
<0> regexp = "(.*)("+(String)formularies_list.get(y)+")(\\.|\\-|,|\\(|\\))(.*)$";
<0> so far I have this
<1> there are pleanty online
<0> yeah, i've used regex before..just never in java
<0> so \\" would work?
<0> \p{Punct}
<1> Two-Bits
<1> arent you a regex freak
<1> we need you help
<1> hehe
<1> i am off asds
<1> have to go now



<2> ummm... maybe?
<0> ok ruds - thanks
<0> Two-Bits
<2> what's the trouble?
<0> how do I specify a "
<0> in regexp
<2> \" i would imagine
<0> that my string must come after "
<0> i tried that
<0> \\" doesnt work
<2> then perhaps \\\"
<0> ok
<2> though you shouldn't need to escape the double quote in regex that i know of
<0> yep
<0> you need to escape it but..
<0> only a \
<0> not a \\
<2> "foo \\\"bar\\\" baz" would have the value foo \"bar\" baz
<0> ah its messed..
<0> its trying to match ALL my regexp lines..
<0> I want it to match ANY
<0> can I paste myh code for u on pastebin?
<2> what's the pattern look like?
<0> sec
<2> yes please
<0> http://pastebin.ca/89687
<0> It's trying to match all of the lines simultaneously
<0> I think*
<0> or its only trying to match the last line
<2> you're re***igning a value to regexp 4 times?
<0> ruds told me we could have multiple regexp lines..
<2> you can, but in java, you're re***igning (changing) the value of your regexp variable
<0> I'd like to have it try and match any of those
<0> yeah
<0> I know..
<0> that's what I thought..
<0> I just wasn't sure the right way to do this
<2> therefore your final pattern is just the last one
<0> yep
<2> let me look at it for a minute
<0> o
<0> ok*
<2> btw, look into Pattern.quote in the meantime
<0> pattern = Pattern.compile(regexp);
<0> can I just compile
<0> pattern = Pattern.compile(regexp, regexp2, regexp3);
<2> no
<0> and then set those regexp some of them to regexp2, regexp3
<0> ok
<2> you can't just say "match one of n" like that, unless you wanted to compile each and run a forloop to test each, which may be the cleanest way ultimately, i dunno
<0> ok
<2> this might all work as one pattern anyway
<0> ok
<2> a few thigns to note:
<2> you're not actually USING any of the matches from what i can tell. you're trying to test for existance. as such, unnecessary grouping like this (.*)$
<0> yeah
<2> is pointless.. it's actually pointless anyway. since that should match anything or nothing after the rest of the pattern til the end
<0> yea
<2> should be removable
<0> well, if I remove that..
<0> I get nothing
<0> no results
<2> are you looking for multiple matches in an input or strictly looking to test for pattern existance?
<0> multiple matches
<2> "in an input" meant i wanted to know if you were looking for multiple instances of this in EACH input
<2> i wasn't asking about multiple inputs matching the pattern
<0> oh
<0> no, just one per input
<2> if i'm reading this right.. you want to match the chosen string value in the inputs if bounded by . - , () double quotes or whitespace?
<0> yes
<0> or a \
<0> or a /
<0> i didnt add those yet, wasn't sure how to
<2> you realize that what you have is attempting to match things like .FOO" and -BAR) right?


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #java
or
Go to some related logs:

#allnitecafe
spanking + getapassword
#chat-world
#linux
#india
#allnitecafe
#india
#kl
banladn
tamiltrick



Home  |  disclaimer  |  contact  |  submit quotes