The following string contains multiple tags. I want to match the contents of each of the
with a pattern, and if it matches, I want
Use a combination of SimpleXML
, XPath
and regular expressions (regex on text()
, etc. are only supported as of XPath 2.0
).
The steps:
p
tags via an xpath queryThis is the actual code:
para 1
نص عربي أو فارسي
para3