Albato
  • Language
    En
    English
    Portuguese
    Spanish
  • Welcome to Albato Help

    Albato: Value Parser tool


    IN THIS ARTICLE

    The Value Parser, or Regular Expressions, is an advanced way to search and replace text.

     

    How to use value parser tool

    In the tool's settings, you can specify:

    what to replace: symbols, characters, words, custom sets (templates), etc.

    replace with: symbols, character, custom sets (templates), etc.

    While simple character search works like a standard "Find and Replace", Regular Expressions are great because you can search for multiple characters, exclude them, add rules, and more.

     

    Examples of custom search templates

    x|y — Searches for x or y

    x(?=y) — Searches for x only if it's followed by y

    [a-d] — Range of characters — Square brackets mean "any character from the list."

    \w+@\w+.\w+ — Searches for email.

    ([0-3]\d).([01]\d).(\d{4}) — Searches for date in format dd.mm.yyyy

    (8|+7|7)[0-9]{7,10} — Searches for phone number in format 8********** or +7**********.

    There are countless templates and combinations to replace text, and you can find many resources online.

     

    Examples of custom value parsing patterns

     

    Case 1: Converting the date format from DD.MM.YYYY to YYYY_MM_DD

    Tool Settings: The "What to replace" and "Replace with" fields use custom templates.

    1.1.png

    Template: ([0-3]\d).([01]\d).(\d{4})

    Replace with: $3_$2_$1.

    The result will look like this:

    1.2.png

     

    Case 2: Remove tags from an email

    What to replace:

    \<(\/?[^>]+)>|(\n)|(\s{4,})
    

    Replace with: Space.

    1.3.png

     

    Case 3: Extracting a domain from a URL

    What to replace: ^https?://([^/]+)/.*$

    Replace with: $1

    This pattern extracts the domain name from a full URL that contains a path or parameters. For example, from https://example.org/id25 you’ll get: example.org

    Did this answer your question?