I'm struggling with regular expression whole day and couldn't find a solution. I'm trying to find some specific number in strings that contains numbers, semicolons, colons and whitespaces.
For our purpose let's say I'm looking for number 1234
Here are few examples which should match (Every line is a different string):
1234
;1234;
1234 : 5678
;1234,3321
And example that shouldn't match (because it's different number):
;12345;
0123456
My current attempt:
[^(0-9*)]1234[^(0-9*)]
Here is a permalink to Regex Tester with my problem: Regex Tester fiddle
[^(0-9*)]means not a digit (0-9), parentheses ((or)) or a star*. You may want to use simply[^0-9](not a digit).