I want to filter a number out of a string with php preg_match that could look like this (they are versions of a software):
- 1.6.2
- 1.6.2#2
- 1.7
(1.6.2#2 is 2. beta of 1.6.2)
So when there is a string like:
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, 1.6.2# sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
Now I want a string that only contains "1.6.2#2"
I tried
(\d?[.|#]?)*
but it does not work
1.6beta.7devel
? - Marc B