Can I use part of Processing source code in my code?

I will not use any regex expression other than what’s possible by PApplet.split(), as I pretty much want to split a path to the file by /, then split last element of that split by .(to get the file’s extension), then replace that last split to “bmp”, and then connect it all back.
However, by reading up on regex on Java’s site I found out that “.” is a regex expression that means any character. I replaced it with “\\.”, with “\\” as an escape sequence for a “\”, and that “\” being an escape sequence for “.” so it wouldn’t match “any character”.

P.S. When writing this comment, for “\\” I had to write “\\\\” to make an escape sequence for this comment to write an escape sequence for Java’s string constant that contains an escape sequence to the regex filter! :smiley: