1. Computing

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

By June 15, 2012

Follow me on:

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:

Comments
Comments are closed for this post.
Leave a Comment

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

©2014 About.com. All rights reserved.