• Share
Send to a Friend via Email

### Your suggestion is on its way!

An email with a link to:

was emailed to:

Thanks for sharing About.com with others!

# Implementing StartsText With SubText As Pattern - When Pattern Is A Regular Expression!

By June 15, 2012

in regex :: For a relative file path like "\abc\def\file.txt" I need to check if the file is located in the "\abc\def" folder (or in any of its sub folders). Let's call this "\abc\def" a predefined path. Note that I am not interested in the drive nor the path complexity before "\abc\def".

How to determine if a substring begins another string in Delphi? Easy: use StartsText (StartsStr, Pos, ...). How to determine if a pattern-like substring begins another string in Delphi? Easy: use regular expression!

Read the full article to learn how to Implement StartsText With SubText As (a Regular Expression) Pattern

Related:

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>