Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

merlyn (47)

AOL IM: realmerlyn (Add Buddy, Send Message)
Yahoo! ID: realmerlyn (Add User, Send Message)

See my home page [].

Journal of merlyn (47)

Thursday September 12, 2002
12:59 PM

High-Seas and Java Regex

[ #7704 ]
I miss having the wireless on-board the Cruise Ship. On the other hand, I had ample spare time to write a 90-minute "Regex in Java" talk that I'm presenting this afternoon.

Turns out java.util.regex in Java 1.4 is a very close cousin to Perl's regex engine, so a lot of my brain was already wired correctly. However, it'll be fun talking about how you have to put four backslashes in a row to get a single backslash on a s/// equivalent. Whoa.

Thank goodness for the timing of MRE2, as I lifted most of what I know about Java regex directly from there. My autographed copy obtained at OSCON is now dog-eared.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • I wrote something like this line a few months back:

    $sql .= " AND path LIKE '\\\\\\\\\\\\\\\\servername\\\\\\\\share\\\\\\\\%'";

    Scary, I know, but it works. I suppose there are various ways of getting rid of at least one level of escaping. Best of course would be to use forward slashes in the database in the first place.