Solid Fluid System Solutions  
Home Software About Hardware Firmware
Folder Icon Worked Example
 
A simple example that shows how to import data into MS Excel. The demonstraton shows how regex removes the repetitive graft.

Document Icon Regex
Document Icon Characters
 
How to specify which characters should match at an arbitary position within a search text.
Document Icon Positioning
 
How to make matches position themselves in relation to non text entities in the search text.
Document Icon Repeat
 
How to repeat the preceeding token match.
Document Icon Groups
 
How to group tokens together for use in repetitions, references or alternatives.
Current Document Icon Special Groups
 
How to create metatoken, conditional and comment groups.
Document Icon Modes
 
How to control the overal mode of a regular expression.

Special groups

This page describes how to create special groups including metatoken groups, conditional groups and comment groups.

Character Description Example

Ways to define groups which act as metatokens

(?=expn-text) This group matches the expression that it contains, but it matches as a position between an arbitary character in the search text and the actual text that it finds afterwards. This group type does not create referrable match text, nor does it contribute to the group index described above. t(?=s) matches the second t in straits .
(?!expn-text) This group behaves in identical manner to the previous one, with the exeption that it will only match externally when it does not match internally. t(?!s) matches the first t in straits .
(?<=simple-text) This group matches the expression that it contains, but it matches as a position between an arbitary character in the search text and the actual text that it finds beforehand. This group type does not create referrable match text, nor does it contribute to the group index described above. This group works only with simple text, or literal, tokens. (?<=s)t matches the first t in straits .
(?<!simple-text) This group behaves in identical manner to the previous one, with the exeption that it will only match externally when it does not match internally. (?<!s)t matches the second t in straits .

Ways to define conditional groups

(?(?=expn-text) then|else) This group type has the capability to select one of a pair of token groups separated by a pipe, on the basis of a conditional group. If the conditional group, the first child group of the conditional group, succeeds in matching it's content then the first of the pipe separated groups is tested. Otherwise the second group is tested. (?(?<=a)b|c) matches the second b and the first c in babxcac
(?(expn-text)then|else) The contitional group may be any valid group. (?(a)b|c) matches ab , the first c and the second c in babxcac

Ways to make comments in regular expressions

(?#comment-text) This type of group ignores it's content completely. This group type can be used to comment regular expressions. a(?#Hello World!)b matches ab
Copyright © Solid Fluid 2007-2022
Last modified: SolFlu  Sun, 21 Jun 2009 00:22:23 GMT