SearchTextRegex Method (GdPicturePDF)
Searches for an occurrence of a given regular expression pattern within the current page of the loaded PDF document according to the parameters you have specified.
This method returns bounding box surrounding the searched expression or set of bounding boxes in case the searched expression spans across multiple lines, defined by its top left coordinates and by its width and height
in inches, if the expression has been found.
public bool SearchTextRegex(
string ,
int ,
bool ,
out IEnumerable<GdPictureRectangleF>
)
public function SearchTextRegex(
: String;
: Integer;
: Boolean;
Out : IEnumerable
): Boolean;
public function SearchTextRegex(
: String,
: int,
: boolean,
: IEnumerable
) : boolean;
public: bool SearchTextRegex(
string* ,
int ,
bool ,
[PARAMFLAG::Out] IEnumerable<GdPictureRectangleF*>*
)
public:
bool SearchTextRegex(
String^ ,
int ,
bool ,
[Out] IEnumerable<GdPictureRectangleF^>^
)
'Declaration
Public Function SearchTextRegex( _
ByVal As String, _
ByVal As Integer, _
ByVal As Boolean, _
ByRef As IEnumerable(Of GdPictureRectangleF) _
) As Boolean
Parameters
- Pattern
- The regular expression pattern to search for.
- Occurrence
- The occurrence (rank) of the searched expression on the current page. Set the occurrence to 1 if you are searching for the first occurrence, set it to 2 for the second etc.
Rank equal to 0 is not accepted, it will always be converted to 1. Please note that the occurrence (rank) is always related to the current page.
- CaseSensitive
- Set this parameter to true if you want to apply case-sensitive search, otherwise set it to false.
- BoundingBoxes
- Output parameter. If the searched expression has been found, this parameter will output an IEnumerable of rectangle areas that surround the occurrence in inches.
Return Value
true if the given text expression has been found on the current page according to the specified parameters, otherwise false. The
GdPicturePDF.GetStat method can be subsequently used to determine if this method has been successful.