Ernesto
Ernesto

Reputation: 9

Regex,Php - find correct names with random numbers in string

Hi i would like to find every string what contains this

SET_X_GAME_X_SCORE

Where X is a random number.

I tried something like this

/^SET_[0-9]_GAME_[0-9]_SCORE(.*)/

but it didn't work.

Any idea? Thanks

Upvotes: 0

Views: 73

Answers (1)

m47730
m47730

Reputation: 2261

Hi i would like to find every string what contains this

If you really mean "contains" then you should stop using the ^ that means begin with

"/SET_[0-9]+_GAME_[0-9]+_SCORE(.*)/"

also a few sample rows within the question would be useful

Upvotes: 1

Related Questions