T
T
test2018-07-07 11:50:57
Regular Expressions
test, 2018-07-07 11:50:57

How to correctly pattern a regular expression?

style="height:452px; width:1000px"
You need to remove the line height:452px; .and the size of the pixels can be any, tried like this
'/height:[0-9]{0-9999}px;/' but somehow it doesn't work

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2018-07-07
@HelmutKampfe

/height\s*:\s*[0-9]+px\s*;/
\s*is any number of whitespace characters (including zero). Just in case.
And you wrote the quantifier incorrectly, it should be at least like this: {0,9999}. Or rather, as I wrote above.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question