Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

MonkPaul's scratchpad

by MonkPaul (Friar)
on Apr 04, 2005 at 13:30 UTC ( #444666=scratchpad: print w/ replies, xml ) Need Help??

This is the sentence I have:

rn:R07491 (S)-2,3-Epoxysqualenel <=> 5-Dehydroepisterol

in which I need to find "(S)-2,3-Epoxysqualenel"

but the regular expression I have doesn't seem to match it:
(?:\W|^)\bArraycompounds[i]\b\W?(?:(?=\W?))

BTW I hate java...
The actual java code I'm using is:

for (j = 0; j < split_compounds_2.length; j++) { //System.out.println(split_compounds_2[j] + "\n"); //regular_expression = "(\\b" + split_compounds_2[j].trim() + "\\b\\W? +)"; //(?:\W|^)\Q$term\E(?:(?=\W)|\z) regular_expression = "(?:\\W|^)\\b"+ split_compounds_2[j].trim() + "\\ +b\\W?(?:(?=\\W?))"; System.out.println(regular_expression + "\n"); new_reaction_2 = new_reaction_2.replaceAll(regular_expression , " [" + + compound_id[0] + "] "); }

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2016-02-11 19:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?





    Results (377 votes), past polls