hello. can anybody help me converting code below from perl to java:
sub validate_and_fix_regex { my $regex = $_[0]; eval { qr/$regex/ }; if ($@) { $regex = rquote($regex); } return $regex; } sub rquote { my $string = $_[0] || return; $string =~ s/([^A-Za-z_0-9 "'\\])/\\$1/g; return $string; }
In reply to Re: From Perl to Java by newmrd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |