У меня есть функция, которая должна проверять строку, чтобы не содержать префикс ниже
Я хочу сопоставить каждое слово с < /p>
__test_timestamp__itemname
< /code>
Некоторые примеры следующие < /p>
__test_1349333576093__cellphone_modelc1
__test_1349333576090__macbook_model_12
< /code>
public boolean isvalid(String Name){
/*pattern match to check for suffix and return true if string starts with
__test_timestamp_
*/
}
< /code>
The person name in this string can vary and so will the timestamp which is in milliseconds , however the timestamp is 13 characters in length and consists of digits , the itemname can contain numbers and underscore
How do I write a function to match this pattern ? Thank you in advance for helping!
Подробнее здесь: https://stackoverflow.com/questions/686 ... ven-string