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

java - Could not locate OpenAL library -

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

sorting - opencl Bitonic sort with 64 bits keys -