(?<=\?>)(\s)+$
(?<=\?>)
: positive lookbehind to find ?>
(but not capture it)
(\s)+
to find any combinaison of spaces, new lines, tabulations, … after the tag
$
to match the end of the string
More Related Contents:
- regular expression [closed]
- How do you implement a good profanity filter?
- preg_match(): Compilation failed: invalid range in character class at offset
- How to add http:// if it doesn’t exist in the URL
- Right way to escape backslash [ \ ] in PHP regex?
- “Unknown modifier ‘g’ in…” when using preg_match in PHP?
- How to validate domain name in PHP?
- Optional Whitespace Regex
- How to replace text URLs and exclude URLs in HTML tags?
- How to split a string by multiple delimiters in PHP?
- Convert string into slug with single-hyphen delimiters only
- Get domain name (not subdomain) in php
- Get numbers from string with PHP
- PHP Regex find text between custom added HTML Tags
- How to Regex-replace multiple tags with one tag?
- Function eregi() is deprecated [duplicate]
- regex matching links without tag
- Split string into sentences using regex
- How to search in an array with preg_match?
- Regex & PHP – isolate src attribute from img tag
- Regex for checking if a string has mismatched parentheses?
- Replace tabs and spaces with a single space as well as carriage returns and newlines with a single newline
- How to validate a domain name using Regex & PHP?
- PHP regex for validating a URL
- Regex matching table rows in HTML [duplicate]
- How to validate phone number using PHP? [duplicate]
- What does [\S\s]* mean in regex in PHP?
- UTF-8 in PHP regular expressions [duplicate]
- Get non-numeric characters then number on each line of a block of texf
- Validate date format in php