I am trying to search each file and find out if the first line is empty. if first line is empty replace with <?php
File looks like this
FIRST LINE BLANK
/**
Replace with
<?php
/**
Any help is appreciated
First Line Blank replace with code
Re: First Line Blank replace with code
The first line in Text Crawler 2 with options set to default (Multi-line anchors unchecked) would be:
^\r\n
This includes the first end-of-line (better: newline) character(s).
You can then replacde this by any text. Be sure to add the newline character(s) again:
This text will appear on the start of the document, i.e. the first line\r\n
You can also capture the newline characters and then re-place this matching part of the regex.
Find:
^(\r\n)
Replace by:
any text$1
^\r\n
This includes the first end-of-line (better: newline) character(s).
You can then replacde this by any text. Be sure to add the newline character(s) again:
This text will appear on the start of the document, i.e. the first line\r\n
You can also capture the newline characters and then re-place this matching part of the regex.
Find:
^(\r\n)
Replace by:
any text$1