Hi
I want a regular expression (Java) for a string in the following form:
Starts with R or S , then space , then number or number / number or number/number/number
examples:
R 51/53 , R 41, R 43, S 36/37/39, S 2, S 24, S 26/2
thanks in advance
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
So the basic regex is:
but it needs some masking, I guess:
I’m always confused, because sed, java, scala – all have different opinions what to mask and what not. 🙂
(update: testet, modified masking)