Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 165
  • Last Modified:

how to use or statement in regex

hi experts,  below is my regular expression
(?s).*<div.*?id="divUMLSAll".*?>.*<span.*?>MSH</span>(.*?)<br.*?

how can we amend this regex to pick values if there is </div> in the end rather then <br /> tag. In simple words how can we use "or" between <br /> and </div>
0
mmalik15
Asked:
mmalik15
1 Solution
 
pivarCommented:
Hi,

Try

(?s).*<div.*?id="divUMLSAll".*?>.*<span.*?>MSH</span>(.*?)(<br|</div>).*?

/peter
0
 
mmalik15Author Commented:
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now