C# Regex needs additional characters -


my current string regex working wanted add <?php , <?php. here code:

 @"\b(public|private)\b"   string keywords = @"\b(public|private)\b"; 

this how can div

 @"<\s*div[^>]*>(.*?)<\s*/div\s*>"; 

how can add <?php , <?php in same regex?

to specify set of acceptable characters in pattern, can either build character class or use predefined one. character class lets represent bunch of characters single item in regular expression. can build own character class enclosing acceptable characters in square brackets.

read using regular expressions php more details , learn how use php in regex.

hope helps.


Comments

Popular posts from this blog

node.js - How to mock a third-party api calls in the backend -

amazon web services - Installing MobileFirst 7.0 server on AWS -

Non Unique Username with ASP.Net Identity 2.0 -