Regex - matching literal characters
Im trying to match the following pattern using regex:
The string begins with a literal '\' is followed by any number of letters and/or numbers and ends with '&0]'
e.g. '\07761739009B&0]'
Im trying to devise my pattern but Im not exactly sure how to work with matching literal characters, I was lead to believe a '//' would dictate that the character is literal but this doesnt work:
Code:
Pattern Serial = Pattern.compile("(\\/.*+\\&0\\])");
Thanks in advance for any suggestions